[
https://issues.apache.org/jira/browse/SOLR-10490?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16483979#comment-16483979
]
Joel Bernstein commented on SOLR-10490:
---------------------------------------
Sorry, I had lost track of this ticket. I'm extremely busy with a release at
Alfresco at the moment. But I will attempt to get this in before the next
release.
> SolrStream should not set hashq filter if numWorkers=0 or if streamContext is
> not set
> -------------------------------------------------------------------------------------
>
> Key: SOLR-10490
> URL: https://issues.apache.org/jira/browse/SOLR-10490
> Project: Solr
> Issue Type: Bug
> Security Level: Public(Default Security Level. Issues are Public)
> Affects Versions: 6.5
> Reporter: kiran
> Assignee: Joel Bernstein
> Priority: Minor
> Fix For: 6.7, 7.0
>
> Attachments: SOLR-10490.patch
>
>
> SolrStream sets hashQ filter to the query even when numWorkers is zero.
> partitionFilter should only be set if numWorkers > 0. Otherwise, it will lead
> to error messages like
> {code}
> 2017-04-07 17:48:16,095 [qtp2012219613-152] ERROR HttpSolrCall -
> null:java.io.IOException: java.lang.RuntimeException:
> java.lang.ArithmeticException: / by zero
> at
> org.apache.solr.search.HashQParserPlugin$HashQuery.createWeight(HashQParserPlugin.java:130)
> at
> org.apache.lucene.search.IndexSearcher.createWeight(IndexSearcher.java:752)
> at
> org.apache.lucene.search.IndexSearcher.createNormalizedWeight(IndexSearcher.java:735)
> at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:473)
> {code}
> This only happens when partitionKeys is set in params and streamContext is
> not set.
> How to replicate: The following code will fail with the above error message^
> {code}
> SolrQuery query = new SolrQuery("*:*");
> query.set("fq", "{!hash workers=2 worker=0}");
> query.set("partitionKeys", "_version_");
> query.set("distrib", "false");
> String shardUrl = "http://localhost:8983/solr/test_shard1_replica1";
> SolrStream stream = new SolrStream(shardUrl, query);
> stream.open();
> Tuple tuple = stream.read();
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]