[ 
https://issues.apache.org/jira/browse/SOLR-7756?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Varun Thacker updated SOLR-7756:
--------------------------------
    Attachment: SOLR-7756.patch

bq. You should reset solr.test.sys.* system properties during teardown.
Fixed

bq. Do we really need 3 shards in the test? I think we can do with just 2 and 
save time for the test run.
Only testSimpleQuery uses 3 shards in which one is empty. The idea of having an 
extra shard is that shard will not contain terms and expose bugs like 
SOLR-7818. We could do with 2 shards with if we indexed something like 
"football world" instead of "football" in one of the documents. But then we'll 
have no way to compare scores of the two returned docuemnts and we can't do an 
equality check on the score. Maybe we could once SOLR-7759 is fixed thereby 
checking debug output and not comparing scores.

bq. There's also a bunch of formatting changes that's a part of the patch. I 
just glanced through it, but in case it's something that's not required, it'd 
be good to not refactor those.
Some of this got formatted with the code style that was added for Intellij 
which got fixed in LUCENE-6514.

bq. In ExactStatsCache#mergeToGlobalStats we insert the terms n times ( n 
number of shards ). Now when a shard doesn't have a term List<Object> terms = 
nl.getAll(TERMS_KEY) will return empty and not null since NamedList#getAll 
works like that. Thus depending on the order in which the shards get hit, if 
the last shard had no terms the terms key was overwritten with blank causing 
distributed idf to not get calculated correctly.

Let's fix this as part of SOLR-7818.

> NPE in ExactStatsCache when a term doesn't exist on a shard
> -----------------------------------------------------------
>
>                 Key: SOLR-7756
>                 URL: https://issues.apache.org/jira/browse/SOLR-7756
>             Project: Solr
>          Issue Type: Bug
>            Reporter: Varun Thacker
>             Fix For: 5.3
>
>         Attachments: SOLR-7756.patch, SOLR-7756.patch, SOLR-7756.patch, 
> SOLR-7756.patch, SOLR-7756.patch
>
>
> If a term doesn't exist on a shard {{ExactStatsCache#getPerShardTermStats}} 
> throws an NullPointerException. 
> Attaching a test and a patch shortly.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to