[ https://issues.apache.org/jira/browse/SOLR-10533?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Amrit Sarkar updated SOLR-10533: -------------------------------- Attachment: (was: SOLR-10533.patch) > Improve checks for which fields can be returned > ----------------------------------------------- > > Key: SOLR-10533 > URL: https://issues.apache.org/jira/browse/SOLR-10533 > Project: Solr > Issue Type: Bug > Security Level: Public(Default Security Level. Issues are Public) > Reporter: Varun Thacker > Attachments: SOLR-10533.patch, SOLR-10533.patch, SOLR-10533.patch > > > I tried using {{DocBasedVersionConstraintsProcessorFactory}} on a field which > was defined as : > {code} > <field name="myVersionField" type="long" indexed="false" stored="false"/> > {code} > The long fieldType has docValues enabled and since useDocValuesAsStored is > true by default in the latest schema I can retrieve this field. > But when I start Solr with this update processor I get the following error > {code} > Caused by: field myVersionField must be defined in schema, be stored, and be > single valued. > {code} > Here's the following check in the update processor where the error originates > from: > {code} > if (userVersionField == null || !userVersionField.stored() || > userVersionField.multiValued()) { > throw new SolrException(SERVER_ERROR, > "field " + versionField + " must be defined in schema, be stored, > and be single valued."); > } > {code} > We should improve the condition to also check if the field docValues is true > and useDocValuesAsStored is true then don't throw this error. > Hoss pointed out in an offline discussion that this issue could be there in > other places in the codebase so keep this issue broad and not just tackle > DocBasedVersionConstraintsProcessorFactory. -- This message was sent by Atlassian JIRA (v6.4.14#64029) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org