Interesting, Thanks Christine. That's a great suggestion. There's so many places where the reg guide could be improved...
Best Robi On Wed, Feb 7, 2024 at 2:20 AM Christine Poerschke (BLOOMBERG/ LONDON) < cpoersc...@bloomberg.net> wrote: > Hello. > > I'd probably describe this as a bug. > > w.r.t. documentation adjustments e.g. > https://github.com/apache/solr/blob/main/solr/solr-ref-guide/modules/indexing-guide/pages/schema-elements.adoc > and > https://github.com/apache/solr/blob/main/solr/solr-ref-guide/modules/query-guide/pages/result-grouping.adoc > is the source behind the Solr Ref Guide and changes can be contributed via > pull requests, just like with code. For small edits perhaps just working in > your browser might suit and/or for more comprehensive information please > see the > https://github.com/apache/solr/blob/main/CONTRIBUTING.md#contributing-documentation > details. > > Best wishes, > Christine > > From: users@solr.apache.org At: 02/07/24 00:31:23 UTCTo: > users@solr.apache.org > Subject: Re: Group by query reports null pointer when unique key is not > stored > > I also got this exception before and in order to avoid reindexing TB's of > data, > had to resort to grouping via streaming expressions, which has its ups and > downs. If it's technically infeasible to substitute docValues for this > purpose > (when useDocValuesAsStored:true), it would be nice if it was documented in > "grouping" feature or advised in general schema design pages to make > unique ID's always stored:true. > > -ufuk yilmaz > ________________________________ > From: rajani m <rajinima...@gmail.com> > Sent: Wednesday, February 7, 2024 3:18 AM > To: solr-user <solr-u...@lucene.apache.org> > Subject: Group by query reports null pointer when unique key is not stored > > Hi Solr Users, > > 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/sea > > rch/grouping/distributed/shardresultserializer/TopGroupsResultTransformer.java#L > 237C24-L237C40 > <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. Any > alternative? > > Would you call this a bug or improvement? > > 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.TopGroupsResul > tTransformer.serializeTopGroups(TopGroupsResultTransformer.java:238) > ~[?:?] > > >