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

ExtendedDismaxQParser (edismax) doesn't parse (*:*) properly

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 4.0-BETA
    • Fix Version/s: None
    • Component/s: query parsers
    • Labels:
      None

      Description

      I just happen to notice that (*:*) is not parsed properly by the edismax (ExtendedDismaxQParser) query parser in 4.0-beta. It appears to require spaces before and after the *:*, otherwise it treats the colon as part of a wildcard term (see the escaping below). I haven’t tried other releases yet.

      My original query:

      http://localhost:8983/solr/select/?debugQuery=true&q=(*:*)&defType=edismax

      Produces this:

      <str name="rawquerystring">(*:*)</str>
      <str name="parsedquery">(+DisjunctionMaxQuery((text:*\:*)))/no_coord</str>
      <str name="parsedquery_toString">+(text:*\:*)</str>
      <str name="QParser">ExtendedDismaxQParser</str>
      

      Some variations I tried:

      <str name="rawquerystring">( *:*)</str>
      <str name="parsedquery">(+DisjunctionMaxQuery((text:*\:*)))/no_coord</str>
      <str name="parsedquery_toString">+(text:*\:*)</str>
       
      <str name="rawquerystring">(*:* )</str>
      <str name="parsedquery">(+DisjunctionMaxQuery((text:*\:*)))/no_coord</str>
      <str name="parsedquery_toString">+(text:*\:*)</str>
       
      <str name="rawquerystring">( *:* )</str>
      <str name="parsedquery">(+MatchAllDocsQuery(*:*))/no_coord</str>
      <str name="parsedquery_toString">+*:*</str>
       
      <str name="rawquerystring">(*:* -fox)</str>
      <str name="parsedquery">
      (+(DisjunctionMaxQuery((text:*\:*)) -DisjunctionMaxQuery((text:fox))))/no_coord
      </str>
      <str name="parsedquery_toString">+((text:*\:*) -(text:fox))</str>
       
      <str name="rawquerystring">( *:* -fox)</str>
      <str name="parsedquery">
      (+(MatchAllDocsQuery(*:*) -DisjunctionMaxQuery((text:fox))))/no_coord
      </str>
      <str name="parsedquery_toString">+(*:* -(text:fox))</str>
      

        Attachments

        1. SOLR-3729.patch
          3 kB
          Jack Krupansky

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                jkrupan Jack Krupansky
              • Votes:
                2 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated: