Class SolrContainerScorer

java.lang.Object
org.apache.lucene.search.Scorer
org.alfresco.solr.query.SolrContainerScorer

public class SolrContainerScorer 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.
Author:
andyh
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.apache.lucene.search.Scorer

    org.apache.lucene.search.Scorer.ChildScorer
  • Field Summary

    Fields inherited from class org.apache.lucene.search.Scorer

    weight
  • Constructor Summary

    Constructors
    Constructor
    Description
    SolrContainerScorer(org.apache.lucene.search.Weight weight, org.apache.lucene.index.PostingsEnum root, StructuredFieldPosition[] positions)
    The arguments here follow the same pattern as used by the PhraseQuery.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
     
    int
     
    org.apache.lucene.search.DocIdSetIterator
     
    float
     

    Methods inherited from class org.apache.lucene.search.Scorer

    getChildren, getWeight, twoPhaseIterator

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SolrContainerScorer

      public SolrContainerScorer(org.apache.lucene.search.Weight weight, org.apache.lucene.index.PostingsEnum root, StructuredFieldPosition[] positions)
      The arguments here follow the same pattern as used by the PhraseQuery. (It has the same unused arguments)
      Parameters:
      weight - - curently unsued
      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
  • Method Details

    • score

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

      public int freq() throws IOException
      Specified by:
      freq in class org.apache.lucene.search.Scorer
      Throws:
      IOException
    • docID

      public int docID()
      Specified by:
      docID in class org.apache.lucene.search.Scorer
    • iterator

      public org.apache.lucene.search.DocIdSetIterator iterator()
      Specified by:
      iterator in class org.apache.lucene.search.Scorer