Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-12336 Remove Filter from Solr
  3. SOLR-14800

Filter default score should be the provided boost, not zero

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Won't Fix
    • None
    • None
    • search
    • None

    Description

      I see some inconsistency in what some "constant scoring queries" return for a score. Lucene's ConstantScoreQuery yields 1 but it can be boosted (e.g. multiplied by whatever). SolrConstantScoreQuery (which wraps a Filter) does the same. Filter itself (which was modified to BE a Query years ago) yields 0 (not boostable), and so if it's used as a Query (vs only used as a supplier of DocIdSet), it's always 0. Nearly all ConstantScoreQuery usages use the provided boost (often indirectly via score() which is initialized to the boost), and do not hard-code 0. I think we should standardize on this approach.

      Note: ToParentBlockJoinQuery (and Child equivalent) use 0 (by code inspection) but this seems to be an anomaly.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              dsmiley David Smiley
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: