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

Edismax parser replaces whitespace characters with spaces

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 8.4.1
    • 8.7, 9.0
    • query parsers
    • 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

              gerlowskija Jason Gerlowski
              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