lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joel Bernstein (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SOLR-10490) SolrStream should not set hashq filter if numWorkers=0 or if streamContext is not set
Date Fri, 14 Apr 2017 02:23:41 GMT

    [ https://issues.apache.org/jira/browse/SOLR-10490?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15968511#comment-15968511
] 

Joel Bernstein commented on SOLR-10490:
---------------------------------------

ok, looks good. Thanks!

> 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
>            Priority: Minor
>             Fix For: 6.6
>
>         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
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message