[
https://issues.apache.org/jira/browse/SOLR-10533?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16214358#comment-16214358
]
Amrit Sarkar edited comment on SOLR-10533 at 10/22/17 3:53 PM:
---------------------------------------------------------------
Added test for {{CSVResponseWriter}}. For rest of the test cases, either a new
{{solrconfig.xml}} or knowledge of the entire component is needed like
MLPParser. [~varunthacker] you can review it and let me know if we need to add
test-cases, it is pretty straightforward.
Also, I need some time to understand either we need to make the changes in
schema package, field and fieldType objects creation and usage.
was (Author: [email protected]):
Added test for {{CSVResponseWriter}}. For rest of the test cases, either a new
{{solrconfig.xml}} or knowledge of the entire component is needed like
MLPParser. [~varunthacker] you can review it and let me know if we need to add
test-cases, it is pretty straightforward.
Also, I need some time to understand either we need to make the changes in
schema package, Field objects creation and usage.
> 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: [email protected]
For additional commands, e-mail: [email protected]