DirectoryProvider[] directoryProviders = searchFactoryImplementor.getDirectoryProviders( clazz );
ReaderProvider readerProvider = searchFactoryImplementor.getReaderProvider();
int count = 0;
for ( DirectoryProvider directoryProvider : directoryProviders ) {
IndexReader reader = readerProvider.openReader( directoryProvider );
IndexSearcher searcher = new IndexSearcher( reader );
BooleanQuery boolQuery = new BooleanQuery();
boolQuery.add( new MatchAllDocsQuery(), BooleanClause.Occur.MUST );
boolQuery.add(
new TermQuery( new Term( ProjectionConstants.OBJECT_CLASS, entity ) ), BooleanClause.Occur.MUST