Revert "select indices that contain type before flushing (delete _mapping)"

This reverts commit 96c00b27fed75feac361418a54fbaccbef658c18.
fix warning