org.modeshape.jcr.query.lucene
Class LuceneQueryEngine
java.lang.Object
org.modeshape.jcr.query.process.QueryEngine
org.modeshape.jcr.query.lucene.LuceneQueryEngine
public class LuceneQueryEngine
- extends QueryEngine
A QueryEngine that uses Lucene for answering queries. Each repository uses a single LuceneQueryEngine instance,
and all sessions share the same engine. Therefore, this engine is threadsafe (and actually immutable), creating objects for
each submitted query.
|
Method Summary |
QueryIndexing |
getQueryIndexing()
Get the interface for updating the indexes. |
QueryResults |
query(ExecutionContext context,
RepositoryCache repositoryCache,
Set<String> workspaceNames,
Map<String,NodeCache> overriddenNodeCachesByWorkspaceName,
QueryCommand query,
Schemata schemata,
PlanHints hints,
Map<String,Object> variables)
Execute the supplied query against the named workspace, using the supplied hints, schemata and variables. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LuceneQueryEngine
public LuceneQueryEngine(ExecutionContext context,
String repositoryName,
Planner planner,
Optimizer optimizer,
org.hibernate.search.engine.spi.SearchFactoryImplementor searchFactory,
org.apache.lucene.util.Version version)
- Parameters:
context - the execution context for the repositoryrepositoryName - the name of the repositoryplanner - the planner that should be usedoptimizer - the optimizer that should be usedsearchFactory - the search factory for accessing the indexesversion - the Lucene version used by the indexes
getQueryIndexing
public QueryIndexing getQueryIndexing()
- Get the interface for updating the indexes.
- Returns:
- the indexing interface
query
public QueryResults query(ExecutionContext context,
RepositoryCache repositoryCache,
Set<String> workspaceNames,
Map<String,NodeCache> overriddenNodeCachesByWorkspaceName,
QueryCommand query,
Schemata schemata,
PlanHints hints,
Map<String,Object> variables)
throws InvalidQueryException
- Execute the supplied query against the named workspace, using the supplied hints, schemata and variables.
- Parameters:
context - the context in which the query is being executed; may not be nullrepositoryCache - the repository cache that should be used to load results; may not be nullworkspaceNames - the name of each workspace to be queried, or an empty set if all the workspaces should be queried;
may not be nulloverriddenNodeCachesByWorkspaceName - the NodeCache instances that should be used to load results, which will be used
instead of the RepositoryCache's NodeCache for a given workspace name; may be null or emptyquery - the queryschemata - the schemata information that should be used for all processing of this queryhints - the hintsvariables - the variables
- Returns:
- the results
- Throws:
InvalidQueryException - if the
Copyright © 2008-2012 JBoss, a division of Red Hat. All Rights Reserved.