Solr
  1. Solr
  2. SOLR-2267

Using query function in bf parameter in the DisMaxQParser forces the use of parameter dereferencing

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: 3.1
    • Fix Version/s: 3.1
    • Component/s: search
    • Labels:
      None

      Description

      The DisMaxQParser parses the bf parameter using the SolrPluginUtils.parseFieldBoosts(...) function. This function tokenizes the string based on whitespaces and then bulilds a map mapping fields to their boost values. Unfortunately, the the *

      {!...}

      * form of a query contains whitespaces and therefore the parsing of the boost function fails.

      This should be considered as a bug as effectively it forces the use of parameter dereferencing which in many cases is not ideal.

        Issue Links

          Activity

          Hide
          Hoss Man added a comment -

          I think categorizing this as a bug is a little far fetched:

          1) since it's creation, the "bf" param has been documented as splitting on white space to extract multiple function arguments (because it pre-dates support for multiple param values in a SolrParams
          2) dismax and bf predate LocalParams syntax
          3) bf is documneted as parsing functions explicitly – not queries, so the use of the LocalParams query syntax shouldn't be implied.

          In my option, now that we have LocalParams the "bf" param should be deprecated and removed in place of just using the "boost" or "bq" param – "bf=..." is functionally equivalent to "bq=

          {!func}

          ..."

          Show
          Hoss Man added a comment - I think categorizing this as a bug is a little far fetched: 1) since it's creation, the "bf" param has been documented as splitting on white space to extract multiple function arguments (because it pre-dates support for multiple param values in a SolrParams 2) dismax and bf predate LocalParams syntax 3) bf is documneted as parsing functions explicitly – not queries, so the use of the LocalParams query syntax shouldn't be implied. In my option, now that we have LocalParams the "bf" param should be deprecated and removed in place of just using the "boost" or "bq" param – "bf=..." is functionally equivalent to "bq= {!func} ..."
          Hide
          Hoss Man added a comment -

          SOLR-2014 addresses the same topic and has a patch, so if there is a fix to be made let's track there

          Show
          Hoss Man added a comment - SOLR-2014 addresses the same topic and has a patch, so if there is a fix to be made let's track there
          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:
              Uri Boness
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development