Hi,
I have two lucene indexes and i need to search on the two indexes. How can i execute a search in multiple lucene indexes? How can i sort these results?
Thanks, Luiz Costa
Hi,
I have two lucene indexes and i need to search on the two indexes. How can i execute a search in multiple lucene indexes? How can i sort these results?
Thanks, Luiz Costa
basic code.. just typed it up check out the doc for more details
IndexSearcher[] searchers = new IndexSearcher[2];
searchers[0] = new IndexSearcher(searchDirOne);
searchers[1] = new IndexSearcher(searchDirTwo);
MultiSearcher searcher = new MultiSearcher(searchers);
Query query = QueryParser.Parse("foo","bar" , new StandardAnalyzer());
Hits hits = searcher.Search(query);