[
https://issues.apache.org/jira/browse/SOLR-7621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14568250#comment-14568250
]
Hoss Man commented on SOLR-7621:
--------------------------------
my first steps were to startup the cloud example and seed it with some data to
try and query...
{noformat}
bin/solr -e cloud -noprompt
bin/post -c gettingstarted example/exampledocs/*.xml
{noformat}
(NOTE: because this uses the data driven configs by default, many fields here
are actually multivalued as a result)
Here's a quick snapshot of one doc in the index using regular search...
{noformat}
curl 'http://localhost:8983/solr/gettingstarted/query?q=id:SOLR1000'
{
"responseHeader":{
"status":0,
"QTime":15,
"params":{
"q":"id:SOLR1000"}},
"response":{"numFound":1,"start":0,"maxScore":3.1972246,"docs":[
{
"id":"SOLR1000",
"name":["Solr, the Enterprise Search Server"],
"manu":["Apache Software Foundation"],
"cat":["software",
"search"],
"features":["Advanced Full-Text Search Capabilities using Lucene",
"Optimized for High Volume Web Traffic",
"Standards Based Open Interfaces - XML and HTTP",
"Comprehensive HTML Administration Interfaces",
"Scalability - Efficient Replication to other Solr Search Servers",
"Flexible and Adaptable with XML configuration and Schema",
"Good unicode support: héllo (hello with an accent over the e)"],
"price":[0.0],
"popularity":[10],
"inStock":[true],
"incubationdate_dt":"2006-01-17T00:00:00Z",
"_version_":1502820680744304640}]
}}
{noformat}
And here's some results modifying the example from the Streaming Expressions
documentation against this data.
ask for a sort on the multivalued price field...
{noformat}
curl --data-urlencode 'stream=search(gettingstarted, q="id:SOLR1000",
fl="id,price", sort="price asc")'
'http://localhost:8983/solr/gettingstarted/stream?indent=true'
{
"error":{
"msg":"java.util.concurrent.ExecutionException: java.io.IOException:
JSONTupleStream: expected ARRAY_START but got EOF",
"trace":"java.io.IOException: java.util.concurrent.ExecutionException:
java.io.IOException: JSONTupleStream: expected ARRAY_START but got EOF\n\tat
org.apache.solr.client.solrj.io.stream.CloudSolrStream.openStreams(CloudSolrStream.java:334)\n\tat
org.apache.solr.client.solrj.io.stream.CloudSolrStream.open(CloudSolrStream.java:232)\n\tat
org.apache.solr.response.TextResponseWriter.writeTupleStream(TextResponseWriter.java:320)\n\tat
org.apache.solr.response.TextResponseWriter.writeVal(TextResponseWriter.java:191)\n\tat
org.apache.solr.response.JSONWriter.writeNamedListAsMapWithDups(JSONResponseWriter.java:184)\n\tat
org.apache.solr.response.JSONWriter.writeNamedList(JSONResponseWriter.java:300)\n\tat
org.apache.solr.response.JSONWriter.writeResponse(JSONResponseWriter.java:96)\n\tat
org.apache.solr.response.JSONResponseWriter.write(JSONResponseWriter.java:61)\n\tat
org.apache.solr.response.QueryResponseWriterUtil.writeQueryResponse(QueryResponseWriterUtil.java:53)\n\tat
org.apache.solr.servlet.HttpSolrCall.writeResponse(HttpSolrCall.java:707)\n\tat
org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:447)\n\tat
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:227)\n\tat
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:196)\n\tat
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)\n\tat
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)\n\tat
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)\n\tat
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)\n\tat
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)\n\tat
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)\n\tat
org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)\n\tat
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)\n\tat
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)\n\tat
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)\n\tat
org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)\n\tat
org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)\n\tat
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)\n\tat
org.eclipse.jetty.server.Server.handle(Server.java:497)\n\tat
org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)\n\tat
org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)\n\tat
org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)\n\tat
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)\n\tat
org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)\n\tat
java.lang.Thread.run(Thread.java:745)\nCaused by:
java.util.concurrent.ExecutionException: java.io.IOException: JSONTupleStream:
expected ARRAY_START but got EOF\n\tat
java.util.concurrent.FutureTask.report(FutureTask.java:122)\n\tat
java.util.concurrent.FutureTask.get(FutureTask.java:188)\n\tat
org.apache.solr.client.solrj.io.stream.CloudSolrStream.openStreams(CloudSolrStream.java:328)\n\t...
32 more\nCaused by: java.io.IOException: JSONTupleStream: expected ARRAY_START
but got EOF\n\tat
org.apache.solr.client.solrj.io.stream.JSONTupleStream.expect(JSONTupleStream.java:99)\n\tat
org.apache.solr.client.solrj.io.stream.JSONTupleStream.advanceToDocs(JSONTupleStream.java:159)\n\tat
org.apache.solr.client.solrj.io.stream.JSONTupleStream.next(JSONTupleStream.java:77)\n\tat
org.apache.solr.client.solrj.io.stream.SolrStream.read(SolrStream.java:148)\n\tat
org.apache.solr.client.solrj.io.stream.CloudSolrStream$TupleWrapper.next(CloudSolrStream.java:415)\n\tat
org.apache.solr.client.solrj.io.stream.CloudSolrStream$StreamOpener.call(CloudSolrStream.java:438)\n\tat
org.apache.solr.client.solrj.io.stream.CloudSolrStream$StreamOpener.call(CloudSolrStream.java:425)\n\tat
java.util.concurrent.FutureTask.run(FutureTask.java:262)\n\tat
org.apache.solr.common.util.ExecutorUtil$MDCAwareThreadPoolExecutor$1.run(ExecutorUtil.java:156)\n\tat
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)\n\tat
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)\n\t...
1 more\n",
"code":500}}
{noformat}
do a search where we try to sort on a field that doesn't exist in any docs
(even though it is a valid field acording to the schema's dynamicField rules) -
first against a single doc, then against all docs in the index...
{noformat}
$ curl --data-urlencode 'stream=search(gettingstarted, q="id:SOLR1000",
fl="id,field_i", sort="field_i asc")'
'http://localhost:8983/solr/gettingstarted/stream?indent=true'
{
"responseHeader":{
"status":0,
"QTime":0},
"tuples":{"numFound":-1,"start":-1,"docs":[{"id":"SOLR1000"},{"EOF":true}]
}}
$ curl --data-urlencode 'stream=search(gettingstarted, q="*:*",
fl="id,field_i", sort="field_i asc")'
'http://localhost:8983/solr/gettingstarted/stream?indent=true'
{
"error":{
"msg":"java.lang.NullPointerException",
"trace":"java.io.IOException: java.lang.NullPointerException\n\tat
org.apache.solr.client.solrj.io.stream.CloudSolrStream.openStreams(CloudSolrStream.java:334)\n\tat
org.apache.solr.client.solrj.io.stream.CloudSolrStream.open(CloudSolrStream.java:232)\n\tat
org.apache.solr.response.TextResponseWriter.writeTupleStream(TextResponseWriter.java:320)\n\tat
org.apache.solr.response.TextResponseWriter.writeVal(TextResponseWriter.java:191)\n\tat
org.apache.solr.response.JSONWriter.writeNamedListAsMapWithDups(JSONResponseWriter.java:184)\n\tat
org.apache.solr.response.JSONWriter.writeNamedList(JSONResponseWriter.java:300)\n\tat
org.apache.solr.response.JSONWriter.writeResponse(JSONResponseWriter.java:96)\n\tat
org.apache.solr.response.JSONResponseWriter.write(JSONResponseWriter.java:61)\n\tat
org.apache.solr.response.QueryResponseWriterUtil.writeQueryResponse(QueryResponseWriterUtil.java:53)\n\tat
org.apache.solr.servlet.HttpSolrCall.writeResponse(HttpSolrCall.java:707)\n\tat
org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:447)\n\tat
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:227)\n\tat
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:196)\n\tat
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)\n\tat
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)\n\tat
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)\n\tat
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)\n\tat
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)\n\tat
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)\n\tat
org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)\n\tat
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)\n\tat
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)\n\tat
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)\n\tat
org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)\n\tat
org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)\n\tat
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)\n\tat
org.eclipse.jetty.server.Server.handle(Server.java:497)\n\tat
org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)\n\tat
org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)\n\tat
org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)\n\tat
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)\n\tat
org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)\n\tat
java.lang.Thread.run(Thread.java:745)\nCaused by:
java.lang.NullPointerException\n\tat
org.apache.solr.client.solrj.io.comp.FieldComparator$2.compare(FieldComparator.java:86)\n\tat
org.apache.solr.client.solrj.io.comp.FieldComparator.compare(FieldComparator.java:93)\n\tat
org.apache.solr.client.solrj.io.comp.FieldComparator.compare(FieldComparator.java:31)\n\tat
org.apache.solr.client.solrj.io.stream.CloudSolrStream$TupleWrapper.compareTo(CloudSolrStream.java:398)\n\tat
org.apache.solr.client.solrj.io.stream.CloudSolrStream$TupleWrapper.compareTo(CloudSolrStream.java:383)\n\tat
java.util.TreeMap.put(TreeMap.java:560)\n\tat
java.util.TreeSet.add(TreeSet.java:255)\n\tat
org.apache.solr.client.solrj.io.stream.CloudSolrStream.openStreams(CloudSolrStream.java:330)\n\t...
32 more\n",
"code":500}}
{noformat}
do a search where we try to sort on a (single valued) field that does exist in
some docs - first against a single doc that does not contain that field, then
against a single doc that does contain that field, then against all docs in the
index...
{noformat}
$ curl --data-urlencode 'stream=search(gettingstarted, q="id:SOLR1000",
fl="id,manufacturedate_dt", sort="manufacturedate_dt asc")'
'http://localhost:8983/solr/gettingstarted/stream?indent=true'
{
"responseHeader":{
"status":0,
"QTime":1},
"tuples":{"numFound":-1,"start":-1,"docs":[{"id":"SOLR1000"},{"EOF":true}]
}}
$ curl --data-urlencode 'stream=search(gettingstarted, q="id:IW-02",
fl="id,manufacturedate_dt", sort="manufacturedate_dt asc")'
'http://localhost:8983/solr/gettingstarted/stream?indent=true'
{
"responseHeader":{
"status":0,
"QTime":1},
"tuples":{"numFound":-1,"start":-1,"docs":[{
"id":"IW-02",
"manufacturedate_dt":"2006-02-14T23:55:59Z"},{"EOF":true}]
}}
$ curl --data-urlencode 'stream=search(gettingstarted, q="*:*",
fl="id,manufacturedate_dt", sort="manufacturedate_dt asc")'
'http://localhost:8983/solr/gettingstarted/stream?indent=true'
{
"error":{
"msg":"java.lang.NullPointerException",
"trace":"java.io.IOException: java.lang.NullPointerException\n\tat
org.apache.solr.client.solrj.io.stream.CloudSolrStream.openStreams(CloudSolrStream.java:334)\n\tat
org.apache.solr.client.solrj.io.stream.CloudSolrStream.open(CloudSolrStream.java:232)\n\tat
org.apache.solr.response.TextResponseWriter.writeTupleStream(TextResponseWriter.java:320)\n\tat
org.apache.solr.response.TextResponseWriter.writeVal(TextResponseWriter.java:191)\n\tat
org.apache.solr.response.JSONWriter.writeNamedListAsMapWithDups(JSONResponseWriter.java:184)\n\tat
org.apache.solr.response.JSONWriter.writeNamedList(JSONResponseWriter.java:300)\n\tat
org.apache.solr.response.JSONWriter.writeResponse(JSONResponseWriter.java:96)\n\tat
org.apache.solr.response.JSONResponseWriter.write(JSONResponseWriter.java:61)\n\tat
org.apache.solr.response.QueryResponseWriterUtil.writeQueryResponse(QueryResponseWriterUtil.java:53)\n\tat
org.apache.solr.servlet.HttpSolrCall.writeResponse(HttpSolrCall.java:707)\n\tat
org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:447)\n\tat
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:227)\n\tat
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:196)\n\tat
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)\n\tat
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)\n\tat
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)\n\tat
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)\n\tat
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)\n\tat
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)\n\tat
org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)\n\tat
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)\n\tat
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)\n\tat
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)\n\tat
org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)\n\tat
org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)\n\tat
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)\n\tat
org.eclipse.jetty.server.Server.handle(Server.java:497)\n\tat
org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)\n\tat
org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)\n\tat
org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)\n\tat
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)\n\tat
org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)\n\tat
java.lang.Thread.run(Thread.java:745)\nCaused by:
java.lang.NullPointerException\n\tat
org.apache.solr.client.solrj.io.comp.FieldComparator$2.compare(FieldComparator.java:86)\n\tat
org.apache.solr.client.solrj.io.comp.FieldComparator.compare(FieldComparator.java:93)\n\tat
org.apache.solr.client.solrj.io.comp.FieldComparator.compare(FieldComparator.java:31)\n\tat
org.apache.solr.client.solrj.io.stream.CloudSolrStream$TupleWrapper.compareTo(CloudSolrStream.java:398)\n\tat
org.apache.solr.client.solrj.io.stream.CloudSolrStream$TupleWrapper.compareTo(CloudSolrStream.java:383)\n\tat
java.util.TreeMap.put(TreeMap.java:560)\n\tat
java.util.TreeSet.add(TreeSet.java:255)\n\tat
org.apache.solr.client.solrj.io.stream.CloudSolrStream.openStreams(CloudSolrStream.java:330)\n\t...
32 more\n",
"code":500}}
{noformat}
> Frequent 500 error IOExceptions from StreamingExpressions
> ---------------------------------------------------------
>
> Key: SOLR-7621
> URL: https://issues.apache.org/jira/browse/SOLR-7621
> Project: Solr
> Issue Type: Bug
> Affects Versions: 5.2
> Reporter: Hoss Man
> Assignee: Joel Bernstein
>
> While trying to test out the new Streaming Expressions functionality, I
> encountered lots of 500 error / IOException with various root causes (i'll
> post details in the comments)
> It looks like the API needs to be better hardend to give the user useful
> feedback and return 4xx errors when used in an incorrect manner
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]