Solr
  1. Solr
  2. SOLR-1584

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

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor 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...

      1. SOLR-1584.patch
        2 kB
        Yonik Seeley

        Activity

        Hide
        Yonik Seeley added a comment -

        regex based patch + tests attached.

        Show
        Yonik Seeley added a comment - regex based patch + tests attached.
        Hide
        Yonik Seeley added a comment -

        committed.

        Show
        Yonik Seeley added a comment - committed.
        Hide
        Hoss Man added a comment -

        Correcting Fix Version based on CHANGES.txt, see this thread for more details...

        http://mail-archives.apache.org/mod_mbox/lucene-dev/201005.mbox/%3Calpine.DEB.1.10.1005251052040.24672@radix.cryptio.net%3E

        Show
        Hoss Man added a comment - Correcting Fix Version based on CHANGES.txt, see this thread for more details... http://mail-archives.apache.org/mod_mbox/lucene-dev/201005.mbox/%3Calpine.DEB.1.10.1005251052040.24672@radix.cryptio.net%3E
        Hide
        Grant Ingersoll added a comment -

        Bulk close for 3.1.0 release

        Show
        Grant Ingersoll added a comment - Bulk close for 3.1.0 release

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development