I'll preface this email by saying that I wasn't sure which mailing list it
belonged on.  It might fit on the dev list (since it involves a potential
Solr bug), but maybe the solr-users list is a better choice (since I'm
probably just misusing Solr).  I settled on the solr-users list.  Sorry if
I chose incorrectly.

Moving on...

I've run into a NullPointerException when trying to use the /stream
handler.  I'm not sure whether I'm doing something wrong with the commands
I'm sending to Solr via curl, or if there's an underlying bug causing this
behavior.

I'm making the stream request:

curl --data-urlencode 'stream=search(gettingstarted, q="*:*",
fl="title,url", sort="_version_ asc", rows="10")'
"localhost:8983/solr/gettingstarted/stream"

Solr responds with:

{"result-set":{"docs":[
{"EXCEPTION":null,"EOF":true}]}}

At this point, I assumed that something was wrong with my command, so I
checked the solr-logs for a hint at the problem.  I found:

ERROR - 2015-12-23 01:32:32.535; [c:gettingstarted s:shard2 r:core_node2
x:gettingstarted_shard2_replica2] org.apache.solr.common.SolrException;
java.lang.NullPointerException
  at
org.apache.solr.client.solrj.io.stream.expr.StreamExpressionParser.generateStreamExpression(StreamExpressionParser.java:47)
  at
org.apache.solr.client.solrj.io.stream.expr.StreamExpressionParser.parse(StreamExpressionParser.java:38)
  at
org.apache.solr.client.solrj.io.stream.expr.StreamFactory.constructStream(StreamFactory.java:168)
  at
org.apache.solr.handler.StreamHandler.handleRequestBody(StreamHandler.java:155)
  at
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:156)

Has anyone seen this behavior before?  Is Solr reacting to something amiss
in my request, or is there maybe a bug here?  I'll admit this is my first
attempt at using the /stream API, so I might be getting something wrong
here.  I consulted the reference guide's examples on using the streaming
API (https://cwiki.apache.org/confluence/display/solr/Streaming+Expressions)
when coming up with my curl command, but I might've missed something.

Anyways, I'd appreciate any insight that anyone can offer on this.  If it
helps, I've included reproduction steps below.

1.) Download and compile Solr trunk.
2.) Start Solr using one of the examples (bin/solr start -e cloud).  Accept
default values.
3.) Index some docs (bin/post -c gettingstarted
http://lucene.apache.org/solr -recursive 1 -delay 1)
4.) Do a search to sanity check the ingestion (curl
"localhost:8983/solr/gettingstarted/select?q=*:*&wt=json")
5.) Make a /stream request for some docs (curl --data-urlencode
'stream=search(gettingstarted, q="*:*", fl="title,url", sort="_version_
asc", rows="10")' "localhost:8983/solr/gettingstarted/stream")

Thanks again for any ideas/help anyone can give.

Best,

Jason

Reply via email to