Filed SOLR-13014 <https://issues.apache.org/jira/browse/SOLR-13014>
-- Jan Høydahl, search solution architect Cominvent AS - www.cominvent.com > 23. nov. 2018 kl. 16:03 skrev Jan Høydahl <jan....@cominvent.com>: > > Hi, > > A customer will use Streaming with VERY LARGE epxressions since they embed > super long query strings in 'search()' part of the expression. Now I was > under the impression that this would always be a POST, but now we get the > following exception when reading the TupleStream which includes in this case > a timeseries() expression. The exception is pasted below (line numbers are > 7.5.0). > > The stack trace lists this line in TimeSeriesStream.java right before the > crash: > https://github.com/apache/lucene-solr/blob/98611d33a7f334ece5faba594120ac3398a0009d/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/TimeSeriesStream.java#L291 > > Here it seems as if the QueryRequest used to execute the JSON FACET is using > the default GET: > > QueryRequest request = new QueryRequest(paramsLoc); > > while it should have been > > QueryRequest request = new QueryRequest(paramsLoc, > SolrRequest.METHOD.POST); > > The same would be true for most other streaming classes. > > > My SolrJ code is: > > paramsLoc.set("expr", expressionString); > paramsLoc.set("qt", "/stream"); > TupleStream solrStream = new SolrStream(baseurl, paramsLoc); // This > solrStream.setStreamContext(context); > solrStream.open(); > > Joel, am I "holding it wrong", or is there a bug? > > ———— stacktrace ------ > > > 26619 ERROR (qtp1373036750-31) [n:127.0.0.1:61613_solr c:mycoll s:shard1 > r:core_node2 x:mycoll_shard1_replica_n1] o.a.s.c.s.i.s.ExceptionStream > java.io.IOException: > org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error > from server at https://127.0.0.1:61613/solr/mycoll: Expected mime type > application/octet-stream but got text/html. <h1>Bad Message > 414</h1><pre>reason: URI Too Long</pre> > at > org.apache.solr.client.solrj.io.stream.TimeSeriesStream.open(TimeSeriesStream.java:296) > at > org.apache.solr.client.solrj.io.stream.LetStream.open(LetStream.java:171) > at > org.apache.solr.client.solrj.io.stream.ExceptionStream.open(ExceptionStream.java:54) > at > org.apache.solr.handler.StreamHandler$TimerStream.open(StreamHandler.java:394) > at > org.apache.solr.client.solrj.io.stream.TupleStream.writeMap(TupleStream.java:78) > at > org.apache.solr.common.util.JsonTextWriter.writeMap(JsonTextWriter.java:164) > at org.apache.solr.common.util.TextWriter.writeVal(TextWriter.java:69) > at > org.apache.solr.response.TextResponseWriter.writeVal(TextResponseWriter.java:152) > at > org.apache.solr.common.util.JsonTextWriter.writeNamedListAsMapWithDups(JsonTextWriter.java:386) > at > org.apache.solr.common.util.JsonTextWriter.writeNamedList(JsonTextWriter.java:292) > at org.apache.solr.response.JSONWriter.writeResponse(JSONWriter.java:73) > at > org.apache.solr.response.JSONResponseWriter.write(JSONResponseWriter.java:66) > at > org.apache.solr.response.QueryResponseWriterUtil.writeQueryResponse(QueryResponseWriterUtil.java:65) > at > org.apache.solr.servlet.HttpSolrCall.writeResponse(HttpSolrCall.java:787) > at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:524) > at > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:377) > at > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:323) > at > org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642) > at > org.apache.solr.client.solrj.embedded.JettySolrRunner$DebugFilter.doFilter(JettySolrRunner.java:139) > at > org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642) > at > org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533) > at > org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255) > at > org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) > at > org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255) > at > org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1317) > at > org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203) > at > org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) > at > org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) > at > org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201) > at > org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1219) > at > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144) > at > org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:674) > at > org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) > at org.eclipse.jetty.server.Server.handle(Server.java:531) > at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:352) > at > org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:260) > at > org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:281) > at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:102) > at > org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:291) > at > org.eclipse.jetty.io.ssl.SslConnection$3.succeeded(SslConnection.java:151) > at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:102) > at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:118) > at > org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333) > at > org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310) > at > org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168) > at > org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126) > at > org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:762) > at > org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:680) > at java.lang.Thread.run(Thread.java:745) > Caused by: > org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error > from server at https://127.0.0.1:61613/solr/mycoll: Expected mime type > application/octet-stream but got text/html. <h1>Bad Message > 414</h1><pre>reason: URI Too Long</pre> > at > org.apache.solr.client.solrj.impl.HttpSolrClient.executeMethod(HttpSolrClient.java:607) > at > org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:255) > at > org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:244) > at > org.apache.solr.client.solrj.impl.LBHttpSolrClient.doRequest(LBHttpSolrClient.java:483) > at > org.apache.solr.client.solrj.impl.LBHttpSolrClient.request(LBHttpSolrClient.java:413) > at > org.apache.solr.client.solrj.impl.CloudSolrClient.sendRequest(CloudSolrClient.java:1107) > at > org.apache.solr.client.solrj.impl.CloudSolrClient.requestWithRetryOnStaleState(CloudSolrClient.java:884) > at > org.apache.solr.client.solrj.impl.CloudSolrClient.request(CloudSolrClient.java:817) > at > org.apache.solr.client.solrj.io.stream.TimeSeriesStream.open(TimeSeriesStream.java:293) > ... 49 more > > > java.io.IOException: --> > https://127.0.0.1:61613/solr/mycoll:org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: > Error from server at https://127.0.0.1:61613/solr/mycoll: Expected mime type > application/octet-stream but got text/html. <h1>Bad Message > 414</h1><pre>reason: URI Too Long</pre> > > > -- > Jan Høydahl, search solution architect > Cominvent AS - www.cominvent.com >