org.elasticsearch.common.lucene.all
Class AllTermQuery.AllTermWeight.AllTermSpanScorer

java.lang.Object
  extended by org.apache.lucene.search.DocIdSetIterator
      extended by org.apache.lucene.search.Scorer
          extended by org.apache.lucene.search.spans.SpanScorer
              extended by org.elasticsearch.common.lucene.all.AllTermQuery.AllTermWeight.AllTermSpanScorer
Enclosing class:
AllTermQuery.AllTermWeight

protected class AllTermQuery.AllTermWeight.AllTermSpanScorer
extends org.apache.lucene.search.spans.SpanScorer


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.lucene.search.Scorer
org.apache.lucene.search.Scorer.ScorerVisitor<P extends org.apache.lucene.search.Query,C extends org.apache.lucene.search.Query,S extends org.apache.lucene.search.Scorer>
 
Field Summary
protected  byte[] payload
           
protected  float payloadScore
           
protected  int payloadsSeen
           
protected  org.apache.lucene.index.TermPositions positions
           
 
Fields inherited from class org.apache.lucene.search.spans.SpanScorer
doc, freq, more, norms, spans, value
 
Fields inherited from class org.apache.lucene.search.Scorer
weight
 
Fields inherited from class org.apache.lucene.search.DocIdSetIterator
NO_MORE_DOCS
 
Constructor Summary
AllTermQuery.AllTermWeight.AllTermSpanScorer(org.apache.lucene.search.spans.TermSpans spans, org.apache.lucene.search.Weight weight, org.apache.lucene.search.Similarity similarity, byte[] norms)
           
 
Method Summary
protected  org.apache.lucene.search.Explanation explain(int doc)
           
protected  float getPayloadScore()
          The score for the payload
protected  float getSpanScore()
          Returns the SpanScorer score only.
protected  void processPayload(org.apache.lucene.search.Similarity similarity)
           
 float score()
           
protected  boolean setFreqCurrentDoc()
           
 
Methods inherited from class org.apache.lucene.search.spans.SpanScorer
advance, docID, freq, nextDoc
 
Methods inherited from class org.apache.lucene.search.Scorer
getSimilarity, score, score, visitScorers, visitSubScorers
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

payload

protected byte[] payload

positions

protected org.apache.lucene.index.TermPositions positions

payloadScore

protected float payloadScore

payloadsSeen

protected int payloadsSeen
Constructor Detail

AllTermQuery.AllTermWeight.AllTermSpanScorer

public AllTermQuery.AllTermWeight.AllTermSpanScorer(org.apache.lucene.search.spans.TermSpans spans,
                                                    org.apache.lucene.search.Weight weight,
                                                    org.apache.lucene.search.Similarity similarity,
                                                    byte[] norms)
                                             throws IOException
Throws:
IOException
Method Detail

setFreqCurrentDoc

protected boolean setFreqCurrentDoc()
                             throws IOException
Overrides:
setFreqCurrentDoc in class org.apache.lucene.search.spans.SpanScorer
Throws:
IOException

processPayload

protected void processPayload(org.apache.lucene.search.Similarity similarity)
                       throws IOException
Throws:
IOException

score

public float score()
            throws IOException
Overrides:
score in class org.apache.lucene.search.spans.SpanScorer
Returns:
getSpanScore() * getPayloadScore()
Throws:
IOException

getSpanScore

protected float getSpanScore()
                      throws IOException
Returns the SpanScorer score only.

Should not be overridden without good cause!

Returns:
the score for just the Span part w/o the payload
Throws:
IOException
See Also:
score()

getPayloadScore

protected float getPayloadScore()
The score for the payload


explain

protected org.apache.lucene.search.Explanation explain(int doc)
                                                throws IOException
Overrides:
explain in class org.apache.lucene.search.spans.SpanScorer
Throws:
IOException


Copyright © 2009-2012. All Rights Reserved.