Hi Rahul,

https://issues.apache.org/jira/browse/SOLR-15546 is a little bit similar in 
symptoms but different part of the code base, so probably no help here.

I wonder if use of a different query parser might potentially provide a 
workaround e.g.

q="{!xmlparser}<TermQuery fieldName='My_Field'>Foto`s</TermQuery>"

or something like that; 
https://solr.apache.org/guide/solr/latest/query-guide/other-parsers.html#xml-query-parser
 has more info about the xmlparser.

Best wishes,
Christine

From: users@solr.apache.org At: 02/26/24 04:54:40 UTCTo:  users@solr.apache.org
Subject: Backtick character in field data breaks streaming query

Hello,
I am running Solr 8.11.1 and running into an issue with stream api. Looks
like searches break when the data contains the backtick character( ` ).
Eg:
http://host-name:8983/solr/MyCollection/stream?expr=search(MyCollection,q="My_Fi
eld:Foto`s",fl="field1",qt="/export")
<http://pidx.idcprodcert.loc:20000/solr/sharepointindex_036DE237-A69B-4E7E-929E-
62C2AB7A7323_multinode/stream?expr=search(sharepointindex_036DE237-A69B-4E7E-929
E-62C2AB7A7323_multinode,q=%22slevel_Url_8:Fotos%22,fl=%22contentid%22)>

Upon further investigation, found that the below change was introduced in
Solr 8.5 to replace ` with " in StreamExpressionParser which is the root
cause.

https://github.com/apache/solr/blob/main/solr/solrj-streaming/src/java/org/apach
e/solr/client/solrj/io/stream/expr/StreamExpressionParser.java#L138

Associated JIRA:
https://issues.apache.org/jira/browse/SOLR-14139

Is there a workaround to get the streaming query working? This is across
multiple shards so I can't use /export directly.

If there is no workaround, in my humble opinion, this seems like a breaking
change and should be considered for rolling back, or the
implementation should be rethought.

Thanks,
Rahul


Reply via email to