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

Solr SQL query parsing fails on multiple LIKE clauses and multiple terms

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 9.0, 8.11.1
    • 8.11.2, 9.1
    • Parallel SQL
    • None

    Description

       

      select count(*) as QUERY_COUNT from test_index WHERE (name LIKE 'Sample Temp*') AND (deploy_id LIKE 'aws*') HAVING count(*) >= 0

       

      Above query fails with error 

          "msg":"org.apache.solr.search.SyntaxError: org.apache.lucene.queryparser.classic.ParseException: Cannot parse 'name:\"Sample': Lexical error at line 1, column 13.  Encountered: <EOF> after : \"\\\"Sample\"",


       

      The bug is in SolrFilter which translates the query as 

      ({!complexphrase}name:"Sample Temp*" AND deploy_id:aws*)


      which fails because of local params parsing I think

      If Solr SQL rewrites the query as

      ({!complexphrase v="name:\"Sample Temp*\"" AND deploy_id:aws*) 

       

      it works

       

      Attachments

        Issue Links

          Activity

            People

              dsmiley David Smiley
              kiranch Kiran
              Votes:
              0 Vote for this issue
              Watchers:
              4 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 - 1h 20m
                  1h 20m