List of usage examples for org.apache.lucene.search IndexSearcher IndexSearcher
public IndexSearcher(IndexReaderContext context, Executor executor)
From source file:com.leavesfly.lia.extsearch.filters.SpecialsFilterTest.java
License:Apache License
protected void setUp() throws Exception { allBooks = new MatchAllDocsQuery(); searcher = new IndexSearcher(TestUtil.getBookIndexDirectory(), true); }
From source file:com.leavesfly.lia.extsearch.queryparser.NumericQueryParserTest.java
License:Apache License
protected void setUp() throws Exception { analyzer = new WhitespaceAnalyzer(); dir = TestUtil.getBookIndexDirectory(); searcher = new IndexSearcher(dir, true); }
From source file:com.liferay.portal.search.lucene.LuceneHelperImpl.java
License:Open Source License
public IndexSearcher getSearcher(long companyId, boolean readOnly) throws IOException { IndexAccessor indexAccessor = _getIndexAccessor(companyId); IndexSearcher indexSearcher = new IndexSearcher(indexAccessor.getLuceneDir(), readOnly); indexSearcher.setDefaultFieldSortScoring(true, true); indexSearcher.setSimilarity(new FieldWeightSimilarity()); return indexSearcher; }
From source file:com.liferay.portal.search.lucene31.LuceneHelperImpl.java
License:Open Source License
public IndexSearcher getSearcher(long companyId, boolean readOnly) throws IOException { IndexAccessor indexAccessor = _getIndexAccessor(companyId); return new IndexSearcher(indexAccessor.getLuceneDir(), readOnly); }