[
https://issues.apache.org/jira/browse/SOLR-13261?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Hoss Man reopened SOLR-13261:
-----------------------------
re-opening due to concerns about this change...
unlike StrField, SortableTextField does not include any garuntee that it's
docValues are usable in results – they may in fact be truncated because of the
(default or explicit){{maxCharsForDocValues}}. This is the entire reason why
SortableTextField defaults to {{useDocValuesAsStored="false"}} – and is the
the reason why a field that explicitly sets {{useDocValuesAsStored="true"}}
gets different behavior (and error) at indexing time if
{{maxCharsForDocValues}} is exceeded -- see the javadocs (and initial
discussion in SOLR-11916) for details.
The _only_ way the DV from SortableTextField should be safe to use in the
ExportResponseWriter is if the user explicitly set
{{useDocValuesAsStored="true"}} -- because otherwise we have no way of being
certain that DV String isn't truncated ... but AFAICT the ExportWriter doesn't
do anything to check {{FieldType.useDocValuesAsStored()}} for any field types,
let alone SortableTextField, and this change doesn't seem to add that.
If I'm missunderstanding things, or if there is some other place in the code
path i'm not realizing that will prevent a {{useDocValuesAsStored="false"}}
SortableTextField from being used with ExportWriter then that's fine -- but
there should realy be a test _proving_ that attempting this will cause an error.
If i'm correct, then this change should be rolled back unless/until
{{useDocValuesAsStored}} is respected by the ExportWriter so that we don't
returning missleadingly truncated values
> Make SortableTextField work with export/streaming
> -------------------------------------------------
>
> Key: SOLR-13261
> URL: https://issues.apache.org/jira/browse/SOLR-13261
> Project: Solr
> Issue Type: Improvement
> Security Level: Public(Default Security Level. Issues are Public)
> Affects Versions: 7.7, 8.0, master (9.0)
> Reporter: Erick Erickson
> Assignee: Erick Erickson
> Priority: Major
> Fix For: master (9.0), 8.1
>
> Attachments: SOLR-13261.patch, SOLR-13261.patch
>
>
> ExportWriter (and perhaps other places) explicitly tests for certain field
> types and error out with "Export fields must either be one of the following
> types: int,float,long,double,string,date,boolean"
> It seems perfectly legal to export SortableTextField as well as it's a DV
> field. How desirable that would be is an open question.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]