Search in sources :

Example 1 with OLuceneCompositeKey

use of com.orientechnologies.lucene.collections.OLuceneCompositeKey in project orientdb by orientechnologies.

the class OLuceneFullTextIndexEngine method getInTx.

@Override
public Object getInTx(Object key, OLuceneTxChanges changes) {
    try {
        Query q = queryBuilder.query(index, key, queryAnalyzer());
        OCommandContext context = null;
        if (key instanceof OLuceneCompositeKey) {
            context = ((OLuceneCompositeKey) key).getContext();
        }
        return getResults(q, context, key, changes);
    } catch (ParseException e) {
        throw OException.wrapException(new OIndexEngineException("Error parsing lucene query"), e);
    }
}
Also used : OLuceneCompositeKey(com.orientechnologies.lucene.collections.OLuceneCompositeKey) Query(org.apache.lucene.search.Query) OCommandContext(com.orientechnologies.orient.core.command.OCommandContext) ParseException(com.orientechnologies.orient.core.sql.parser.ParseException) OIndexEngineException(com.orientechnologies.orient.core.index.OIndexEngineException)

Aggregations

OLuceneCompositeKey (com.orientechnologies.lucene.collections.OLuceneCompositeKey)1 OCommandContext (com.orientechnologies.orient.core.command.OCommandContext)1 OIndexEngineException (com.orientechnologies.orient.core.index.OIndexEngineException)1 ParseException (com.orientechnologies.orient.core.sql.parser.ParseException)1 Query (org.apache.lucene.search.Query)1