org.modeshape.search.lucene.query
Class ScoreQuery.NotScorer

java.lang.Object
  extended by org.apache.lucene.search.DocIdSetIterator
      extended by org.apache.lucene.search.Scorer
          extended by org.modeshape.search.lucene.query.ScoreQuery.NotScorer
Enclosing class:
ScoreQuery

protected static class ScoreQuery.NotScorer
extends org.apache.lucene.search.Scorer

A scorer for the NOT query that iterates over documents (in increasing docId order), using the given scorer implementation for the operand of the NOT.


Field Summary
 
Fields inherited from class org.apache.lucene.search.DocIdSetIterator
NO_MORE_DOCS
 
Constructor Summary
protected ScoreQuery.NotScorer(org.apache.lucene.search.Scorer operandScorer, org.apache.lucene.index.IndexReader reader)
           
 
Method Summary
 int advance(int target)
          
 int docID()
          
 int nextDoc()
          
 float score()
           This method always returns a score of 1.0 for the current document, since only those documents that satisfy the NOT are scored by this scorer.
 
Methods inherited from class org.apache.lucene.search.Scorer
getSimilarity, score, score
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScoreQuery.NotScorer

protected ScoreQuery.NotScorer(org.apache.lucene.search.Scorer operandScorer,
                               org.apache.lucene.index.IndexReader reader)
Parameters:
operandScorer - the scorer that is used to score the documents based upon the operand of the NOT; may not be null
reader - the reader that has access to all the docs ...
Method Detail

docID

public int docID()

Specified by:
docID in class org.apache.lucene.search.DocIdSetIterator
See Also:
DocIdSetIterator.docID()

nextDoc

public int nextDoc()
            throws IOException

Specified by:
nextDoc in class org.apache.lucene.search.DocIdSetIterator
Throws:
IOException
See Also:
DocIdSetIterator.nextDoc()

advance

public int advance(int target)
            throws IOException

Specified by:
advance in class org.apache.lucene.search.DocIdSetIterator
Throws:
IOException
See Also:
DocIdSetIterator.advance(int)

score

public float score()

This method always returns a score of 1.0 for the current document, since only those documents that satisfy the NOT are scored by this scorer.

Specified by:
score in class org.apache.lucene.search.Scorer
See Also:
Scorer.score()


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