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

Edismax parser replaces whitespace characters with spaces

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 8.4.1
    • Fix Version/s: 8.7, master (9.0)
    • Component/s: query parsers
    • Labels:
      None

      Description

      If, in an expression, a value with a whitespace char is directly preceded by a special char "[" or "(", whitespace char in the value gets replaced with space.

      This does not happen, if there is a space between "[" and a double quote in the expression.

      For example, if we have a document with cat_s field containing a value "57\n157", following query works:

      "q":"cat_s:[ \"57\n157\" TO \"57\n157\"]",
      "defType":"edismax"

      but

      "q":"cat_s:[\"57\n157\" TO \"57\n157\"]",
      "defType":"edismax

      does not, as lower boundary value gets replaces with "57 157" in ExtendedDismaxQParser after following calls

      List<Clause> clauses = splitIntoClauses(userQuery, false);
      String mainUserQuery = rebuildUserQuery(clauses, config.lowercaseOperators);

      As a workaround, we need to add a space before a double quote in expressions.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                gerlowskija Jason Gerlowski
                Reporter:
                yuriykoval Yuriy Koval
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 50m
                  50m