Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| ModeShape Distribution 3.0.0.Alpha6
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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`.

Nested Class Summary
`protected static class` | `LuceneQueryEngine.LuceneAccessQuery` The component that is created to represent a single access query and, when executed, transforms that access query into a single Lucene query and issues it against Lucene.
`protected static class` | `LuceneQueryEngine.LuceneQueryProcessor` The `QueryProcessor` implementation used by this `LuceneQueryEngine`.
`static class` | `LuceneQueryEngine.TupleCollector`

Field Summary

Fields inherited from class org.modeshape.jcr.query.process.QueryEngine
`optimizer, planner, processor`

Constructor Summary
`LuceneQueryEngine(ExecutionContext context, String repositoryName, Planner planner, Optimizer optimizer, org.hibernate.search.engine.spi.SearchFactoryImplementor searchFactory, org.apache.lucene.util.Version version)`

Method Summary
`QueryIndexing` | `getQueryIndexing()` Get the interface for updating the indexes.
`CancellableQuery` | `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.
`void` | `shutdown()`

Methods inherited from class org.modeshape.jcr.query.process.QueryEngine
`determineQueryResultColumns, execute`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### 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 repository
  `repositoryName` - the name of the repository
  `planner` - the planner that should be used
  `optimizer` - the optimizer that should be used
  `searchFactory` - the search factory for accessing the indexes
  `version` - the Lucene version used by the indexes

Method Detail

### shutdown

    public void shutdown()

### getQueryIndexing

    public QueryIndexing getQueryIndexing()

  Get the interface for updating the indexes.

  Returns:
    the indexing interface

### query

    public CancellableQuery 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 null
    `repositoryCache` - the repository cache that should be used to load results; may not be null
    `workspaceNames` - the name of each workspace to be queried, or an empty set if all the workspaces should be queried; may not be null
    `overriddenNodeCachesByWorkspaceName` - 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 empty
    `query` - the query
    `schemata` - the schemata information that should be used for all processing of this query
    `hints` - the hints
    `variables` - the variables
  Returns:
    the results
  Throws:
    `InvalidQueryException` - if the

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| ModeShape Distribution 3.0.0.Alpha6
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2008-2012 JBoss, a division of Red Hat. All Rights Reserved.