Class ScoredDocIdCollector

    • Field Detail

      • numDocIds

        protected int numDocIds
      • docBase

        protected int docBase
    • Method Detail

      • create

        public static ScoredDocIdCollector create​(int maxDoc,
                                                  boolean enableScoring)
        Creates a new ScoredDocIdCollector with the given parameters.
        Parameters:
        maxDoc - the number of documents that are expected to be collected. Note that if more documents are collected, unexpected exceptions may be thrown. Usually you should pass IndexReader.maxDoc() of the same IndexReader with which the search is executed.
        enableScoring - if scoring is enabled, a score will be computed for every matching document, which might be expensive. Therefore if you do not require scoring, it is better to set it to false.
      • getDefaultScore

        public abstract float getDefaultScore()
        Returns the default score used when scoring is disabled.
      • setDefaultScore

        public abstract void setDefaultScore​(float defaultScore)
        Set the default score. Only applicable if scoring is disabled.