Re: Json Parse Exception in CloudSolrStream class

2016-07-03 Thread Erick Erickson
What version of Solr? Are you perhaps running into:
https://issues.apache.org/jira/browse/SOLR-7647?

On Sun, Jul 3, 2016 at 5:54 PM, Susmit Shukla  wrote:
> 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" 
>
> org.noggit.JSONParser$ParseException: Expected ',' or '}':
> char=F,position=43701
> BEFORE='4DC93D74AEDE28292D27A2EC39F8761E1","field_dv":""F' AFTER='irst
> (alias) last" 
> 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


Json Parse Exception in CloudSolrStream class

2016-07-03 Thread Susmit Shukla
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" 

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