Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-1584

setIncludeScore is added to the "FL" field instead of being concated

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.4
    • 1.5, 3.1, 4.0-ALPHA
    • clients - java
    • None

    Description

      The current implementation of setIncludeScore(boolean) adds the value "score" to the FL parameter.
      This causes a problem when using the setFields followed by include score.
      If I do this:

      setFields("*");
      setIncludeScore(true);

      I would expect the outcome to be "fl=*,score"
      Instead the outcome is: "fl=* &fl=score" which fails to use the score field as FL is not a multi-valued field.

      The current implementation in the SolrJ SolrQuery object is:
      add("fl", "score")
      instead it should be:
      set("fl", get("fl") + ",score")

      obviously not as simplistic as that, but you catch my drift...

      Attachments

        1. SOLR-1584.patch
          2 kB
          Yonik Seeley

        Activity

          People

            Unassigned Unassigned
            asaf Asaf Ary
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: