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

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.4
    • Fix Version/s: 1.5, 3.1, 4.0-ALPHA
    • Component/s: clients - java
    • Labels:
      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

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: