merging 5348 from nihvivo-rel-1.1-maint to trunk
This commit is contained in:
parent
bc2b73885d
commit
bcba2f22e7
1 changed files with 64 additions and 68 deletions
|
@ -93,14 +93,10 @@ public class LuceneSetup implements javax.servlet.ServletContextListener {
|
||||||
indexer.addObj2Doc(new Entity2LuceneDoc());
|
indexer.addObj2Doc(new Entity2LuceneDoc());
|
||||||
context.setAttribute(LuceneIndexer.class.getName(), indexer);
|
context.setAttribute(LuceneIndexer.class.getName(), indexer);
|
||||||
|
|
||||||
// Here we want to put the LuceneSearcher in the application scope.
|
//This is where to get a LucenIndex from. The indexer will
|
||||||
// the queries need to know the analyzer to use so that the same one can be used
|
//need to reference this to notify it of updates to the index
|
||||||
// to analyze the fields in the incoming user query terms.
|
LuceneIndexFactory lif = LuceneIndexFactory.getLuceneIndexFactoryFromContext(context);
|
||||||
LuceneSearcher searcher = new LuceneSearcher(
|
indexer.setLuceneIndexFactory(lif);
|
||||||
new LuceneQueryFactory(getAnalyzer(), ALLTEXT), indexDir);
|
|
||||||
searcher.addObj2Doc(new Entity2LuceneDoc());
|
|
||||||
context.setAttribute(Searcher.class.getName(), searcher);
|
|
||||||
indexer.addSearcher(searcher);
|
|
||||||
|
|
||||||
// This is where the builder gets the list of places to try to
|
// This is where the builder gets the list of places to try to
|
||||||
// get objects to index. It is filtered so that non-public text
|
// get objects to index. It is filtered so that non-public text
|
||||||
|
|
Loading…
Add table
Reference in a new issue