Example usage for org.apache.lucene.search IndexSearcher IndexSearcher

List of usage examples for org.apache.lucene.search IndexSearcher IndexSearcher

Introduction

In this page you can find the example usage for org.apache.lucene.search IndexSearcher IndexSearcher.

Prototype

public IndexSearcher(IndexReaderContext context, Executor executor) 

Source Link

Document

Creates a searcher searching the provided top-level IndexReaderContext .

Usage

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);
}