[
https://issues.apache.org/jira/browse/SOLR-17155?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17823274#comment-17823274
]
rajanimaski commented on SOLR-17155:
------------------------------------
{{SolrDocumentFetcher}} method fetches list of stored fields names and
retrieves only stored fields via {{enableLazyLoading}} . This drops the {{id}}
field which is not stored and hence the null pointer exception.
Is there a variant of {{SolrDocumentFetcher}} which also fetches list of
fields that are set to be {{useDocValuesAsStored}} true? Using that should
resolve this issue.
> Groupby query reports null pointer when unique key is not stored
> ----------------------------------------------------------------
>
> Key: SOLR-17155
> URL: https://issues.apache.org/jira/browse/SOLR-17155
> Project: Solr
> Issue Type: Bug
> Components: Grouping, query
> Affects Versions: 9.4.1
> Reporter: rajanimaski
> Priority: Major
>
> Group by query is failing with the following error message. It looks like
> [TopGroupsResultTransformer.java|https://github.com/apache/solr/blob/main/solr/core/src/java/org/apache/solr/search/grouping/distributed/shardresultserializer/TopGroupsResultTransformer.java#L237C24-L237C40]
> retrieveDocument method is fetching doc based on id is calling a stored
> field visitor method. I tried setting the "id" field to use doc values as
> they are enabled "useDocValuesAsStored:true" but this didn't help.
>
>
> Error message -
> java.lang.NullPointerException: Cannot invoke
> "org.apache.lucene.index.IndexableField.stringValue()" because "f" is null =>
> java.lang.NullPointerException: Cannot invoke
> "org.apache.lucene.index.IndexableField.stringValue()" because "f" is null at
> org.apache.solr.schema.FieldType.toExternal(FieldType.java:378)
> java.lang.NullPointerException: Cannot invoke
> "org.apache.lucene.index.IndexableField.stringValue()" because "f" is null at
> org.apache.solr.schema.FieldType.toExternal(FieldType.java:378) ~[?:?] at
> org.apache.solr.search.grouping.distributed.shardresultserializer.TopGroupsResultTransformer.serializeTopGroups(TopGroupsResultTransformer.java:238)
> ~[?:?]
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]