Please file a JIRA issue.  Also mention which version of JIRA you use for
the "Affects version".
~ David Smiley
Apache Lucene/Solr Search Developer
http://www.linkedin.com/in/davidwsmiley


On Wed, Aug 19, 2020 at 9:49 AM Bram Van Dam <bram.van...@intix.eu> wrote:

> Hey folks,
>
> I would occasionally bump into an NPE in QueryComponent.mergeIds when
> using timeAllowed. Here's a little patch which seems to fix the issue. I
> suspect sortFieldValues can be null depending on when the query
> execution is aborted?
>
>  - Bram
>
> diff --git
> a/solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java
> b/solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java
> index 853da1c3a38..c7e7c1e6b86 100644
> ---
> a/solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java
> +++
> b/solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java
> @@ -932,7 +932,7 @@ public class QueryComponent extends SearchComponent
>
>          @SuppressWarnings({"rawtypes"})
>          NamedList sortFieldValues =
> (NamedList)(srsp.getSolrResponse().getResponse().get("sort_values"));
> -        if (sortFieldValues.size()==0 && // we bypass merging this
> response only if it's partial itself
> +        if ((null == sortFieldValues || sortFieldValues.size()==0) &&
> // we bypass merging this response only if it's partial itself
>                              thisResponseIsPartial) { // but not the
> previous one!!
>            continue; //fsv timeout yields empty sort_vlaues
>          }
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
> For additional commands, e-mail: dev-h...@lucene.apache.org
>
>

Reply via email to