SenseiQueryBuilderFactory queryBuilderFactory = pluginRegistry.getBeanByFullPrefix(SENSEI_QUERY_BUILDER_FACTORY, SenseiQueryBuilderFactory.class);
if (queryBuilderFactory == null) {
QueryParser queryParser = new QueryParser(Version.LUCENE_35, "contents", analyzer);
queryBuilderFactory = new DefaultJsonQueryBuilderFactory(queryParser);
}
SenseiCore senseiCore = new SenseiCore(nodeid, partitions, zoieSystemFactory, indexingManager, queryBuilderFactory, decorator);
senseiCore.setSystemInfo(sysInfo);
SenseiIndexPruner indexPruner = pluginRegistry.getBeanByFullPrefix(SENSEI_INDEX_PRUNER, SenseiIndexPruner.class);
if (indexPruner != null) {
senseiCore.setIndexPruner(indexPruner);
}
if (pluggableSearchEngineManager != null) {
senseiCore.setPluggableSearchEngineManager(pluggableSearchEngineManager);
}
return senseiCore;
}