org.alfresco.repo.search.impl.lucene.query
Class ContainerScorer

java.lang.Object
  extended by org.apache.lucene.search.DocIdSetIterator
      extended by org.apache.lucene.search.Scorer
          extended by org.alfresco.repo.search.impl.lucene.query.ContainerScorer

public class ContainerScorer
extends org.apache.lucene.search.Scorer

The scorer for structured field queries. A document either matches or it does not, there for the frequency is reported as 0.0f or 1.0.


Constructor Summary
ContainerScorer(org.apache.lucene.search.Weight weight, org.apache.lucene.index.TermPositions root, StructuredFieldPosition[] positions, org.apache.lucene.index.TermPositions containers, org.apache.lucene.search.Similarity similarity, byte[] norms)
          The arguments here follow the same pattern as used by the PhraseQuery.
 
Method Summary
 int doc()
           
 org.apache.lucene.search.Explanation explain(int doc)
           
 boolean next()
           
 float score()
           
 boolean skipTo(int target)
           
 
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

ContainerScorer

public ContainerScorer(org.apache.lucene.search.Weight weight,
                       org.apache.lucene.index.TermPositions root,
                       StructuredFieldPosition[] positions,
                       org.apache.lucene.index.TermPositions containers,
                       org.apache.lucene.search.Similarity similarity,
                       byte[] norms)
The arguments here follow the same pattern as used by the PhraseQuery. (It has the same unused arguments)

Parameters:
weight - - curently unsued
tps - - the term positions for the terms we are trying to find
root - - the term positions for documents with multiple entries - this may be null, or contain no matches - it specifies those things that appear under multiple categories etc.
positions - - the structured field positions - where terms should appear
similarity - - used in the abstract scorer implementation
norms - - unused
Method Detail

next

public boolean next()
             throws java.io.IOException
Specified by:
next in class org.apache.lucene.search.DocIdSetIterator
Throws:
java.io.IOException

doc

public int doc()
Specified by:
doc in class org.apache.lucene.search.DocIdSetIterator

score

public float score()
            throws java.io.IOException
Specified by:
score in class org.apache.lucene.search.Scorer
Throws:
java.io.IOException

skipTo

public boolean skipTo(int target)
               throws java.io.IOException
Specified by:
skipTo in class org.apache.lucene.search.DocIdSetIterator
Throws:
java.io.IOException

explain

public org.apache.lucene.search.Explanation explain(int doc)
                                             throws java.io.IOException
Specified by:
explain in class org.apache.lucene.search.Scorer
Throws:
java.io.IOException


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.