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

## org.modeshape.search.lucene.query
Class IdsQuery

    java.lang.Object
      org.apache.lucene.search.Query
          org.modeshape.search.lucene.query.IdsQuery

All Implemented Interfaces:
  Serializable, Cloneable

    public class IdsQuery

extends org.apache.lucene.search.Query

A Lucene `Query` implementation that is used to score positively those documents that have a ID in the supplied set. This works for large sets of IDs; in smaller numbers, it may be more efficient to create a boolean query that checks for each of the IDs.

See Also:
  Serialized Form

Nested Class Summary
`protected class` | `IdsQuery.IdScorer` A scorer for the Path query.
`protected class` | `IdsQuery.IdSetWeight` Calculates query weights and builds query scores for our NOT queries.

Field Summary
`protected String` | `fieldName`
`protected org.apache.lucene.document.FieldSelector` | `fieldSelector`
`protected Set<String>` | `uuids` The operand that is being negated by this query.

Constructor Summary
`IdsQuery(String fieldName, Set<String> ids)` Construct a `Query` implementation that scores nodes according to the supplied comparator.

Method Summary
`org.apache.lucene.search.Weight` | `createWeight(org.apache.lucene.search.Searcher searcher)`
`protected boolean` | `includeDocument(org.apache.lucene.index.IndexReader reader, int docId)`
`String` | `toString(String field)`

Methods inherited from class org.apache.lucene.search.Query
`clone, combine, equals, extractTerms, getBoost, getSimilarity, hashCode, mergeBooleanQueries, rewrite, setBoost, toString, weight`

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

Field Detail

### uuids

    protected final Set<String> uuids

  The operand that is being negated by this query.

### fieldSelector

    protected final org.apache.lucene.document.FieldSelector fieldSelector

### fieldName

    protected final String fieldName

Constructor Detail

### IdsQuery

    public IdsQuery(String fieldName,
                    Set<String> ids)

  Construct a `Query` implementation that scores nodes according to the supplied comparator.

  Parameters:
    `fieldName` - the name of the document field containing the value; may not be null
    `ids` - the set of ID values; may not be null

Method Detail

### includeDocument

    protected boolean includeDocument(org.apache.lucene.index.IndexReader reader,
                                      int docId)
                               throws IOException

  Throws:
    `IOException`

### createWeight

    public org.apache.lucene.search.Weight createWeight(org.apache.lucene.search.Searcher searcher)

  Overrides:
    `createWeight` in class `org.apache.lucene.search.Query`
  See Also:
    `Query.createWeight(org.apache.lucene.search.Searcher)`

### toString

    public String toString(String field)

  Specified by:
    `toString` in class `org.apache.lucene.search.Query`
  See Also:
    `Query.toString(java.lang.String)`

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

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