[ https://issues.apache.org/jira/browse/SOLR-16570?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17740345#comment-17740345 ]
minami takuya commented on SOLR-16570: -------------------------------------- [~hossman] Hello This error has been addressed by the ticket SOLR-16611, and you should find that it's resolved by this. As for why the NullPointerException does not occur when you use hint=top_fc after not using it, it's likely due to the presence of a queryResultCache for that specific query. When this cache is present, the process does not reach the point where the error occurs, hence, you do not encounter the NullPointerException. > 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 > Affects Versions: 9.1 > Reporter: Chris M. Hostetter > Priority: Major > > 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: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org