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 LuceneQuery

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

    @NotThreadSafe
    public class LuceneQuery

extends Object

A utility class that represents the Lucene Query object (or objects) that are to be executed.

Constructor Summary
`LuceneQuery(String pushDownIndexName)`

Method Summary
`void` | `addConstraintForPostprocessing(Constraint constraint)` Record one of the ANDed constraints could not be converted into a Lucene query and thus will need to be handled after the Lucene processing is done.
`void` | `addQuery(org.apache.lucene.search.Query query)` Add a Lucene query for one of the ANDed constraints.
`Constraint` | `getPostProcessingConstraints()` Get the ANDed-constraints that could not be pushed down to Lucene.
`String` | `getPushDownIndexName()` Get the index against which the `push-down query` should be executed.
`org.apache.lucene.search.Query` | `getPushDownQuery()` Get the Lucene query that should be executed.
`boolean` | `matchesNone()` Return whether the `pushdown query` will always return no results.
`String` | `toString()`

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

Constructor Detail

### LuceneQuery

    public LuceneQuery(String pushDownIndexName)

Method Detail

### addQuery

    public void addQuery(org.apache.lucene.search.Query query)

  Add a Lucene query for one of the ANDed constraints.

  Parameters:
    `query` - the Lucene query; never null

### addConstraintForPostprocessing

    public void addConstraintForPostprocessing(Constraint constraint)

  Record one of the ANDed constraints could not be converted into a Lucene query and thus will need to be handled after the Lucene processing is done.

  Parameters:
    `constraint` -

### matchesNone

    public boolean matchesNone()

  Return whether the `pushdown query` will always return no results.

  Returns:
    true if the queries will always return no results, or false if there are `getPushDownQuery()` to run.

### getPushDownQuery

    public org.apache.lucene.search.Query getPushDownQuery()

  Get the Lucene query that should be executed.

  Returns:
    the queries for each index; never null but possibly empty if there are no Lucene queries to execute (perhaps because the criteria resulted in queries that always returned no results)

### getPushDownIndexName

    public String getPushDownIndexName()

  Get the index against which the `push-down query` should be executed.

  Returns:
    the name of the index for the push-down query; never null

### getPostProcessingConstraints

    public Constraint getPostProcessingConstraints()

  Get the ANDed-constraints that could not be pushed down to Lucene.

  Returns:
    the constraints that could not be pushed down, or null if all constraints could be transformed into `Lucene queries`

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

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.