lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Susmit Shukla <shukla.sus...@gmail.com>
Subject Json Parse Exception in CloudSolrStream class
Date Mon, 04 Jul 2016 00:54:21 GMT
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" <first@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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message