[ 
https://issues.apache.org/jira/browse/SOLR-12248?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16678061#comment-16678061
 ] 

Munendra S N commented on SOLR-12248:
-------------------------------------

 [^SOLR-12248.patch] 
[~erickerickson]
This is because in case of BoolField and StrField default createField is 
called. The method returns null when stored=false and indexed=false, 
{code:java}
https://github.com/apache/lucene-solr/blob/master/solr/core/src/java/org/apache/solr/schema/FieldType.java#L269
{code}
Hence, using createFields instead of createField as this handles docValues=true 
case. I'm not sure when can creatdFields would return an empty list while doing 
grouping.

> Grouping in SolrCloud fails if indexed="false" docValues="true" and 
> stored="false"
> ----------------------------------------------------------------------------------
>
>                 Key: SOLR-12248
>                 URL: https://issues.apache.org/jira/browse/SOLR-12248
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>    Affects Versions: 6.6.2
>            Reporter: Erick Erickson
>            Assignee: Erick Erickson
>            Priority: Minor
>         Attachments: SOLR-12248.patch
>
>
> In SolrCloud _only_ (it works in stand-alone mode), a field defined as:
> <field name="boolean_mvn_in_dvy_sn" type="boolean"  multiValued="false"  
> indexed="false"  docValues="true"  stored="false"  />
> will fail with the following error:
> java.lang.NullPointerException
> org.apache.solr.schema.BoolField.toExternal(BoolField.java:131)
> org.apache.solr.schema.BoolField.toObject(BoolField.java:142)
> org.apache.solr.schema.BoolField.toObject(BoolField.java:51)
> org.apache.solr.search.grouping.endresulttransformer.GroupedEndResultTransformer.transform(GroupedEndResultTransformer.java:72)
> org.apache.solr.handler.component.QueryComponent.groupedFinishStage(QueryComponent.java:830)
> org.apache.solr.handler.component.QueryComponent.finishStage(QueryComponent.java:793)
> org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:435)
> org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:173)
> .
> .
> curiously enough it succeeds with a field identically defined except for 
> stored="true"



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to