private Integer getParameter(int shard, IndexWriterSetting setting, Class testEntity) {
   EntityIndexBinder mappingForEntity = searchFactory.getIndexBindingForEntity(testEntity);
   DirectoryBasedIndexManager indexManager =
       (DirectoryBasedIndexManager) mappingForEntity.getIndexManagers()[shard];
   LuceneIndexingParameters luceneIndexingParameters = indexManager.getIndexingParameters();
   return luceneIndexingParameters.getIndexParameters().getCurrentValueFor(setting);
 }
Ejemplo n.º 2
0
 static DocumentBuilderIndexedEntity<?> getDocumentBuilder(QueryBuildingContext queryContext) {
   final SearchFactoryImplementor factory = queryContext.getFactory();
   final Class<?> type = queryContext.getEntityType();
   EntityIndexBinder indexBinding = factory.getIndexBindingForEntity(type);
   if (indexBinding == null) {
     throw new AssertionFailure("Class in not indexed: " + type);
   }
   return indexBinding.getDocumentBuilder();
 }