Skip to content

Commit

Permalink
SENSEI-283
Browse files Browse the repository at this point in the history
  • Loading branch information
javasoze committed Mar 21, 2013
1 parent 4ffb80b commit acb95e5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public interface SenseiConfParams {
public static final String SENSEI_INDEXER_COPIER_HDFS = "hdfs";

public static final String SENSEI_INDEX_ANALYZER = "sensei.index.analyzer";
public static final String SENSEI_QUERY_ANALYZER = "sensei.query.analyzer";
public static final String SENSEI_INDEX_SIMILARITY = "sensei.index.similarity";
public static final String SENSEI_INDEX_INTERPRETER = "sensei.index.interpreter";
public static final String SENSEI_INDEX_CUSTOM = "sensei.index.custom";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -487,9 +487,14 @@ public SenseiCore buildCore() throws ConfigurationException {
if (indexingManager == null){
indexingManager = new DefaultStreamingIndexingManager(_senseiSchema,_senseiConf, pluginRegistry, _gateway,strategy, pluggableSearchEngineManager);
}

Analyzer queryAnalyzer = pluginRegistry.getBeanByFullPrefix(SENSEI_QUERY_ANALYZER, Analyzer.class);
if (queryAnalyzer == null) {
queryAnalyzer = analyzer;
}
SenseiQueryBuilderFactory queryBuilderFactory = pluginRegistry.getBeanByFullPrefix(SENSEI_QUERY_BUILDER_FACTORY, SenseiQueryBuilderFactory.class);
if (queryBuilderFactory == null){
QueryParser queryParser = new QueryParser(Version.LUCENE_35,"contents", analyzer);
QueryParser queryParser = new QueryParser(Version.LUCENE_35,"contents", queryAnalyzer);
queryBuilderFactory = new DefaultJsonQueryBuilderFactory(queryParser);
}
SenseiCore senseiCore = new SenseiCore(nodeid,partitions,zoieSystemFactory,indexingManager,queryBuilderFactory, decorator);
Expand Down

0 comments on commit acb95e5

Please sign in to comment.