Hi,

I'm using a string field in sort parameters of a solr query. The query is
used with /export handler to stream data using CloudSolrStream. When the
data in field contains a double quote, the cloudSolrStream fails to read
data and throws this error -

field data = "first (alias) last" <fi...@bar.com>

org.noggit.JSONParser$ParseException: Expected ',' or '}':
char=F,position=43701
BEFORE='4DC93D74AEDE28292D27A2EC39F8761E1","field_dv":""F' AFTER='irst
(alias) last" <first@bar'

at org.noggit.JSONParser.err(JSONParser.java:356)

at org.noggit.JSONParser.nextEvent(JSONParser.java:958)

at org.noggit.ObjectBuilder.getObject(ObjectBuilder.java:124)

at org.noggit.ObjectBuilder.getVal(ObjectBuilder.java:57)

at org.noggit.ObjectBuilder.getVal(ObjectBuilder.java:37)

at
org.apache.solr.client.solrj.io.stream.JSONTupleStream.next(JSONTupleStream.java:85)

at
org.apache.solr.client.solrj.io.stream.SolrStream.read(SolrStream.java:148)


Should I json escape the string before indexing.. Also I do not need to
retrieve this field but /export handler makes it mandatory to retrieve all
the fields that are used for sort criteria.


Thanks,

Susmit

Reply via email to