org.apache.jackrabbit.core.query.lucene
Class LuceneQueryFactory

java.lang.Object
  extended by org.apache.jackrabbit.core.query.lucene.LuceneQueryFactory

public class LuceneQueryFactory
extends Object

Factory that creates Lucene queries from QOM elements.


Constructor Summary
LuceneQueryFactory(SessionImpl session, SearchIndex index, Map<String,Value> bindVariables)
          Creates a new lucene query factory.
 
Method Summary
 org.apache.lucene.search.Query create(FullTextSearchImpl fts)
          Creates a lucene query for the given QOM full text search.
 org.apache.lucene.search.Query create(PropertyExistenceImpl prop)
          Creates a lucene query for the given QOM property existence constraint.
 org.apache.lucene.search.Query create(Selector selector)
          Creates a lucene query for the given QOM selector.
 List<Row> execute(Map<String,PropertyValue> columns, Selector selector, Constraint constraint)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LuceneQueryFactory

public LuceneQueryFactory(SessionImpl session,
                          SearchIndex index,
                          Map<String,Value> bindVariables)
                   throws RepositoryException
Creates a new lucene query factory.

Parameters:
session - the session that executes the query.
index - the search index
bindVariables - the bind variable values of the query
Throws:
RepositoryException
Method Detail

execute

public List<Row> execute(Map<String,PropertyValue> columns,
                         Selector selector,
                         Constraint constraint)
                  throws RepositoryException,
                         IOException
Throws:
RepositoryException
IOException

create

public org.apache.lucene.search.Query create(Selector selector)
                                      throws RepositoryException
Creates a lucene query for the given QOM selector.

Parameters:
selector - the selector.
Returns:
a lucene query for the given selector.
Throws:
RepositoryException - if an error occurs while creating the query.

create

public org.apache.lucene.search.Query create(FullTextSearchImpl fts)
                                      throws RepositoryException
Creates a lucene query for the given QOM full text search.

Parameters:
constraint - the full text search constraint.
Returns:
the lucene query for the given constraint.
Throws:
RepositoryException - if an error occurs while creating the query.

create

public org.apache.lucene.search.Query create(PropertyExistenceImpl prop)
                                      throws RepositoryException
Creates a lucene query for the given QOM property existence constraint.

Parameters:
constraint - the QOM constraint.
Returns:
the lucene query for the given constraint.
Throws:
RepositoryException - if an error occurs while creating the query.


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.