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 LuceneProcessingContext

    java.lang.Object
      org.modeshape.jcr.query.lucene.LuceneProcessingContext

    @ThreadSafe
    public class LuceneProcessingContext

extends Object

Constructor Summary
`protected` | `LuceneProcessingContext(QueryContext queryContext, String repositoryName, org.hibernate.search.SearchFactory searchFactory, LuceneSchema schema)`

Method Summary
`void` | `close()` Close all of the readers and searchers that are associated with this processing context.
`QueryContext` | `getQueryContext()`
`LuceneQueryFactory` | `getQueryFactory()`
`org.apache.lucene.index.IndexReader` | `getReader(String indexName)` Get an IndexReader for the Lucene index with the supplied name.
`String` | `getRepositoryName()`
`org.apache.lucene.search.IndexSearcher` | `getSearcher(String indexName)` Get an IndexSearcher for the Lucene index with the supplied name.
`Set<String>` | `getWorkspaceNames()` Return the name of each workspace to be queried, or an empty set if all the workspaces should be queried.

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

Constructor Detail

### LuceneProcessingContext

    protected LuceneProcessingContext(QueryContext queryContext,
                                      String repositoryName,
                                      org.hibernate.search.SearchFactory searchFactory,
                                      LuceneSchema schema)

Method Detail

### getQueryContext

    public QueryContext getQueryContext()

  Returns:
    queryContext

### getQueryFactory

    public LuceneQueryFactory getQueryFactory()

  Returns:
    queryFactory

### getWorkspaceNames

    public Set<String> getWorkspaceNames()

  Return the name of each workspace to be queried, or an empty set if all the workspaces should be queried.

  Returns:
    workspaceNames the workspace names; never null

### getRepositoryName

    public String getRepositoryName()

  Returns:
    repositoryName

### getReader

    public org.apache.lucene.index.IndexReader getReader(String indexName)
                                                  throws LuceneException

  Get an IndexReader for the Lucene index with the supplied name. Note that this method is thread-safe such that there will only be one IndexReader instance for a given named index.

  Parameters:
    `indexName` - the name of the index; may not be null
  Returns:
    the IndexReader; never null
  Throws:
    `LuceneException` - if the index manager to which the named index belongs failed to start

### getSearcher

    public org.apache.lucene.search.IndexSearcher getSearcher(String indexName)
                                                       throws LuceneException

  Get an IndexSearcher for the Lucene index with the supplied name. Note that this method is thread-safe such that there will only be one IndexSearcher instance (and underlying IndexSearcher instance) for a given named index.

  Parameters:
    `indexName` - the name of the index; may not be null
  Returns:
    the IndexSearcher; never null
  Throws:
    `LuceneException` - if the index manager to which the named index belongs failed to start

### close

    public void close()

  Close all of the readers and searchers that are associated with this processing context.

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.