Search in sources :

Example 1 with OLuceneQueryContext

use of com.orientechnologies.lucene.query.OLuceneQueryContext in project orientdb by orientechnologies.

the class OLuceneFullTextIndexEngine method getResults.

private Set<OIdentifiable> getResults(Query query, OCommandContext context, Object key, OLuceneTxChanges changes) {
    try {
        IndexSearcher searcher = searcher();
        OLuceneQueryContext queryContext = new OLuceneQueryContext(context, searcher, query).setChanges(changes);
        if (facetManager.supportsFacets()) {
            facetManager.addFacetContext(queryContext, key);
        }
        return OLuceneResultSetFactory.INSTANCE.create(this, queryContext);
    } catch (IOException e) {
        throw OIOException.wrapException(new OIndexException("Error reading from Lucene index"), e);
    }
}
Also used : IndexSearcher(org.apache.lucene.search.IndexSearcher) OLuceneQueryContext(com.orientechnologies.lucene.query.OLuceneQueryContext) OIndexException(com.orientechnologies.orient.core.index.OIndexException) OIOException(com.orientechnologies.common.io.OIOException) IOException(java.io.IOException)

Aggregations

OIOException (com.orientechnologies.common.io.OIOException)1 OLuceneQueryContext (com.orientechnologies.lucene.query.OLuceneQueryContext)1 OIndexException (com.orientechnologies.orient.core.index.OIndexException)1 IOException (java.io.IOException)1 IndexSearcher (org.apache.lucene.search.IndexSearcher)1