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

EDisMax parser blows up with query containing single plus or minus

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.2, 6.0
    • Component/s: query parsers
    • Labels:
      None

      Description

      We are running solr with sunspot and when we set up a query containing a single plus, Solr blows up with the following error:
      SOLR Request (5.0ms) [ path=#<RSolr::Client:0x4c7464ac> parameters={data: fq=type%3A%28Attachment+OR+User+OR+GpdbDataSource+OR+HadoopInstance+OR+GnipInstance+OR+Workspace+OR+Workfile+OR+Tag+OR+Dataset+OR+HdfsEntry%29&fq=type_name_s%3A%28Attachment+OR+User+OR+Instance+OR+Workspace+OR+Workfile+OR+Tag+OR+Dataset+OR+HdfsEntry%29&fq=%28security_type_name_sm%3A%28Dataset%29+AND+-instance_account_ids_im%3A%282+OR+1%29%29&fq=%28security_type_name_sm%3AChorusView+AND+member_ids_im%3A1+AND+-public_b%3Atrue%29&fq=%28security_type_name_sm%3A%28Dataset%29+AND+instance_account_ids_im%3A%282+OR+1%29%29&fq=%28security_type_name_sm%3AChorusView+AND+-member_ids_im%3A1+AND+-public_b%3Atrue%29&q=%2B&fl=%2A+score&qf=name_texts+first_name_texts+last_name_texts+file_name_texts&defType=edismax&hl=on&hl.simple.pre=%40%40%40hl%40%40%40&hl.simple.post=%40%40%40endhl%40%40%40&start=0&rows=3, method: post, params: {:wt=>:ruby}, query: wt=ruby, headers:

      {"Content-Type"=>"application/x-www-form-urlencoded; charset=UTF-8"}

      , path: select, uri: http://localhost:8982/solr/select?wt=ruby, open_timeout: , read_timeout: } ]

      RSolr::Error::Http (RSolr::Error::Http - 400 Bad Request
      Error: org.apache.lucene.queryParser.ParseException: Cannot parse '': Encountered "<EOF>" at line 1, column 0.
      Was expecting one of:
      <NOT> ...
      "+" ...
      "-" ...
      "(" ...
      "*" ...
      <QUOTED> ...
      <TERM> ...
      <PREFIXTERM> ...
      <WILDTERM> ...

        Attachments

        1. SOLR-4480.patch
          5 kB
          Yonik Seeley
        2. SOLR-4480.patch
          4 kB
          Jan Høydahl
        3. SOLR-4480.patch
          4 kB
          Jan Høydahl

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              fionatay Fiona Tay
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: