lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dennis Gove (JIRA)" <>
Subject [jira] [Updated] (SOLR-8409) Complex q param in Streaming Expression results in a bad query
Date Thu, 04 Feb 2016 01:15:39 GMT


Dennis Gove updated SOLR-8409:
    Attachment: SOLR-8409.patch

This new patch ensures that escaped quotes in the parameters of a CloudSolrStream stream are
properly re-escaped when converting back to a string expression. This is necessary for situations
where the expression is passed off to workers.

Note the comment in CloudSolrStream
      // SOLR-8409: This is a special case where the params contain a " character
      // Do note that in any other BASE streams with parameters where a " might come into
      // that this same replacement needs to take place.
      value = value.replace("\"", "\\\"");

I hope that this comment is heeded if additional base streams dealing with solr params are
ever added.

> Complex q param in Streaming Expression results in a bad query
> --------------------------------------------------------------
>                 Key: SOLR-8409
>                 URL:
>             Project: Solr
>          Issue Type: Bug
>          Components: SolrJ
>    Affects Versions: Trunk
>            Reporter: Dennis Gove
>            Priority: Minor
>              Labels: streaming, streaming_api
>         Attachments: SOLR-8409.patch, SOLR-8409.patch
> When providing an expression like 
> {code}
> stream=search(people, fl="id,first", sort="first asc", q="presentTitles:\"chief executive
officer\" AND age:[36 TO *]")
> {code}
> the following error is seen.
> {code}
> no field name specified in query and no default specified via 'df' param
> {code}
> I believe the issue is related to the \" (escaped quotes) and the spaces in the q field.
If I remove the spaces then the query returns results as expected (though I've yet to validate
if those results are accurate).
> This requires some investigation to get down to the root cause. I would like to fix it
before Solr 6 is cut.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message