[
https://issues.apache.org/jira/browse/SOLR-11961?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16877284#comment-16877284
]
Elaine Cario commented on SOLR-11961:
-------------------------------------
FWIW, I am also getting the same error in our systems (Solr 6.4.2). A more
informative stack trace:
{code:java}
ERROR - 2019-07-01 16:07:53.771; org.apache.solr.common.SolrException;
java.lang.ClassCastException: java.lang.Double cannot be cast to
org.apache.lucene.util.BytesRef
at org.apache.solr.schema.FieldType.marshalStringSortValue(FieldType.java:1056)
at org.apache.solr.schema.StrField.marshalSortValue(StrField.java:104)
at
org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.serializeSearchGroup(SearchGroupsResultTransformer.java:121)
at
org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.transform(SearchGroupsResultTransformer.java:60)
at
org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.transform(SearchGroupsResultTransformer.java:36)
at
org.apache.solr.search.grouping.CommandHandler.processResult(CommandHandler.java:205)
at
org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:410)
at
org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:295)
at
com.wolterskluwer.atlas.solr.requesthandlers.WKRequestHandler.handleRequestBody(WKRequestHandler.java:84)
at
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:166)
at
com.wolterskluwer.gpo.search.solr.handler.RequestContextHandler.handleRequest(RequestContextHandler.java:19)
at org.apache.solr.core.SolrCore.execute(SolrCore.java:2299)
at org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:658)
at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:464)
at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:345)
at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:296)
at
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1691)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:582)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
at
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
at
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:512)
at
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
at
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at
org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213)
at
org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:119)
at
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
at org.eclipse.jetty.server.Server.handle(Server.java:534)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:320)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)
at
org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
at
org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)
at
org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)
at
org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
at
org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)
at
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
at
org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
at java.lang.Thread.run(Thread.java:748)
{code}
In all cases, we found the failing queries contained the following combination
of features:
* grouping
* sort using a function query (which seems to be the root cause of the
exception)
* distribution
Any one of the following changes will allow the query to execute successfully:
* set group=false
* remove the function query from the sort
* execute the query against only a single shard (distrib=false)
Example params:
{code}
&hl=false
&q=(2016 OR wkaka:(q2w4r5tburgerlijkwetboekboek20artikel16)^1000)
&prefres=if(termfreq(wkaka,q2w4r5tburgerlijkwetboekboek20artikel16),1,0)
&sort=$prefres desc, score desc, wkdocid desc
&group.sort=wksortdate desc, wkdocid asc
&group.field=wkxpresscluster
&group=true
&group.limit=3
&group.offset=0
&json.facet={"wkxpresscluster":"unique(wkxpresscluster)"}
&start=0
&rows=50
&qt=/search
&hl.q=(2016)
&fl=wkdocid,score
{code}
I am continuing the investigation on my side for any workarounds, will post
here if I have anything to add.
> group.query and sort with function getting error in solrcloud
> -------------------------------------------------------------
>
> Key: SOLR-11961
> URL: https://issues.apache.org/jira/browse/SOLR-11961
> Project: Solr
> Issue Type: Bug
> Components: search, SolrCloud
> Affects Versions: 6.4, 6.4.2
> Reporter: adeppa
> Priority: Major
> Attachments: Screen Shot 2018-02-13 at 11.41.45 AM.png
>
>
> while querying combination of group.query and sort function is not working
> getting below error
>
> Environment :
> Solr 6.4.2 and solr cloud mode with two shards and replication factor 2
> AWS with ubuntu
> query :/solr/qa/select?fq=((level:*.RL AND
> im_field_destination_category:7845 AND im_field_geography:6937 AND
> im_field_legacy_category:(7875 OR 12949 OR 7902 OR 12954) AND
> im_field_report_research_type:7854) OR (im_field_destination_category:7845
> AND im_field_geography:6937 AND im_field_legacy_category:(7875 OR 12949 OR
> 7902 OR 12954) AND im_field_report_research_type:7855 AND
> ${sku}))&group.query= im_field_deliverable_type:(12941)&group.query=
>
> im_field_deliverable_type:(12941)&group=true&indent=on&q=*:*&sku=sm_field_sku:(manpq7416
>
> OR TTPMUS0005A OR TTPXSI1015US OR TTPMUS0004B OR
> TTPDPRUS0215)&sort=product(if(exists(query(\{!v="${sku}"})),1,0),2)
> desc&wt=json
> if run same query in sudo node will working ,please help me on this
> Error:
> {
> "responseHeader":{
> "zkConnected":true,
> "status":500,
> "QTime":8,
> "params":{
> "q":"*:*",
> "indent":"on",
> "fq":"((level:*.RL AND im_field_destination_category:7845 AND
> im_field_geography:6937 AND im_field_legacy_category:(7875 OR 12949 OR 7902
> OR 12954) AND im_field_report_research_type:7854) OR
> (im_field_destination_category:7845 AND im_field_geography:6937 AND
> im_field_legacy_category:(7875 OR 12949 OR 7902 OR 12954) AND
> im_field_report_research_type:7855 AND ${sku}))",
> "sort":"product(if(exists(query(\{!v=\"${sku}\"})),1,0),2) desc",
> "group.query":[" im_field_deliverable_type:(12941)",
> " im_field_deliverable_type:(12941)"],
> "sku":"sm_field_sku:(manpq7416 OR TTPMUS0005A OR TTPXSI1015US OR
> TTPMUS0004B OR TTPDPRUS0215)",
> "wt":"json",
> "_":"1518098081571",
> "group":"true"}},
> "error":{
> "metadata":[
> "error-class","org.apache.solr.common.SolrException",
>
>
> "root-error-class","org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException"],
>
> "msg":"org.apache.solr.client.solrj.SolrServerException: No live
> SolrServers available to handle this
> request:[[http://172.22.0.231:8983/solr/qa_shard1_replica2],
> [http://172.22.0.231:8983/solr/qa_shard2_replica2],
> [http://172.22.1.249:8983/solr/qa_shard1_replica3]]",
> "trace":"org.apache.solr.common.SolrException:
> org.apache.solr.client.solrj.SolrServerException: No live SolrServers
> available to handle this
> request:[[http://172.22.0.231:8983/solr/qa_shard1_replica2],
> [http://172.22.0.231:8983/solr/qa_shard2_replica2],
> [http://172.22.1.249:8983/solr/qa_shard1_replica3]]\n\tat
>
> org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:415)\n\tat
>
>
> org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:166)\n\tat
>
> org.apache.solr.core.SolrCore.execute(SolrCore.java:2299)\n\tat
> org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:658)\n\tat
> org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:464)\n\tat
>
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:345)\n\tat
>
>
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:296)\n\tat
>
>
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1691)\n\tat
>
>
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:582)\n\tat
>
>
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)\n\tat
>
>
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)\n\tat
>
>
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)\n\tat
>
>
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180)\n\tat
>
>
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:512)\n\tat
>
>
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)\n\tat
>
>
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112)\n\tat
>
>
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)\n\tat
>
>
> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213)\n\tat
>
>
> org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:119)\n\tat
>
>
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)\n\tat
>
> org.eclipse.jetty.server.Server.handle(Server.java:534)\n\tat
> org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:320)\n\tat
>
> org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)\n\tat
>
>
> org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)\n\tat
>
> org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)\n\tat
>
> org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)\n\tat
>
>
> org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)\n\tat
>
>
> org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)\n\tat
>
>
> org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)\n\tat
>
>
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)\n\tat
>
>
> org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)\n\tat
>
> java.lang.Thread.run(Thread.java:748)\nCaused by:
> org.apache.solr.client.solrj.SolrServerException: No live SolrServers
> available to handle this
> request:[[http://172.22.0.231:8983/solr/qa_shard1_replica2],
> [http://172.22.0.231:8983/solr/qa_shard2_replica2],
> [http://172.22.1.249:8983/solr/qa_shard1_replica3]]\n\tat
>
> org.apache.solr.client.solrj.impl.LBHttpSolrClient.request(LBHttpSolrClient.java:414)\n\tat
>
>
> org.apache.solr.handler.component.HttpShardHandlerFactory.makeLoadBalancedRequest(HttpShardHandlerFactory.java:302)\n\tat
>
>
> org.apache.solr.handler.component.HttpShardHandler.lambda$submit$0(HttpShardHandler.java:166)\n\tat
>
> java.util.concurrent.FutureTask.run(FutureTask.java:266)\n\tat
>
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)\n\tat
> java.util.concurrent.FutureTask.run(FutureTask.java:266)\n\tat
>
> com.codahale.metrics.InstrumentedExecutorService$InstrumentedRunnable.run(InstrumentedExecutorService.java:176)\n\tat
>
>
> org.apache.solr.common.util.ExecutorUtil$MDCAwareThreadPoolExecutor.lambda$execute$0(ExecutorUtil.java:229)\n\tat
>
>
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)\n\tat
>
>
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)\n\t...
>
> 1 more\nCaused by:
> org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error
> from server at [http://172.22.0.231:8983/solr/qa_shard1_replica2:]
> java.lang.Double cannot be cast to org.apache.lucene.util.BytesRef\n\tat
>
> org.apache.solr.client.solrj.impl.HttpSolrClient.executeMethod(HttpSolrClient.java:610)\n\tat
>
>
> org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:279)\n\tat
>
>
> org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:268)\n\tat
>
>
> org.apache.solr.client.solrj.impl.LBHttpSolrClient.doRequest(LBHttpSolrClient.java:435)\n\tat
>
>
> org.apache.solr.client.solrj.impl.LBHttpSolrClient.request(LBHttpSolrClient.java:387)\n\t...
>
> 10 more\n",
> "code":500}}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]