Chris M. Hostetter created SOLR-16570:
-----------------------------------------
Summary: collapse w/ nullPolicy=expand + hint=top_fc can NPE on
empty collection
Key: SOLR-16570
URL: https://issues.apache.org/jira/browse/SOLR-16570
Project: Solr
Issue Type: Bug
Security Level: Public (Default Security Level. Issues are Public)
Affects Versions: 9.1
Reporter: Chris M. Hostetter
Here's a weird one i just encountered (but haven't dug into in depth)...
* empty index
* collapse on a string field
* using both {{nullPolicy=expand}} and {{hint=top_fc}} causes a
NullPointerException
** Using only one of these options, or neither of these options, returns
expected (empty) result set
What makes this bug particularly bizare, is that if you (successfully) query
using {{nullPolicy=expand}} *WITH OUT* using {{hint=top_fc}}, and then you add
{{hint=top_fc}} on a subsequent request, the NPE doesn't manifest...
{noformat}
hossman@slate:~/lucene/solr [j11] [branch_9_1] $
./solr/packaging/build/dev/bin/solr -e cloud -noprompt
...
hossman@slate:~/lucene/solr [j11] [branch_9_1] $ curl --globoff
'http://localhost:8983/solr/gettingstarted_shard1_replica_n2/select?q=*:*&distrib=false&fq={!collapse+nullPolicy=expand+field=foo_s+hint=top_fc}'
{
"responseHeader":{
"zkConnected":true,
"status":500,
"QTime":45,
"params":{
"q":"*:*",
"distrib":"false",
"fq":"{!collapse nullPolicy=expand field=foo_s hint=top_fc}"}},
"error":{
"trace":"java.lang.NullPointerException\n\tat
org.apache.solr.search.CollapsingQParserPlugin$OrdScoreCollector.<init>(CollapsingQParserPlugin.java:621)...
...
hossman@slate:~/lucene/solr [j11] [branch_9_1] $ curl --globoff
'http://localhost:8983/solr/gettingstarted_shard1_replica_n2/select?q=*:*&distrib=false&fq={!collapse+nullPolicy=expand+field=foo_s}'
{
"responseHeader":{
"zkConnected":true,
"status":0,
"QTime":24,
"params":{
"q":"*:*",
"distrib":"false",
"fq":"{!collapse nullPolicy=expand field=foo_s}"}},
"response":{"numFound":0,"start":0,"numFoundExact":true,"docs":[]
}}
hossman@slate:~/lucene/solr [j11] [branch_9_1] $ curl --globoff
'http://localhost:8983/solr/gettingstarted_shard1_replica_n2/select?q=*:*&distrib=false&fq={!collapse+nullPolicy=expand+field=foo_s+hint=top_fc}'
{
"responseHeader":{
"zkConnected":true,
"status":0,
"QTime":5,
"params":{
"q":"*:*",
"distrib":"false",
"fq":"{!collapse nullPolicy=expand field=foo_s hint=top_fc}"}},
"response":{"numFound":0,"start":0,"numFoundExact":true,"docs":[]
}}
{noformat}
(Note: this doesn't appear to be a "new" bug, it reproduces in 8.11 as well ..
probably been around for a while)
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]