[
https://issues.apache.org/jira/browse/SOLR-10832?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16051190#comment-16051190
]
ASF subversion and git services commented on SOLR-10832:
--------------------------------------------------------
Commit 45af5576a5cbf2e20b9576a200b852042ad76ec1 in lucene-solr's branch
refs/heads/branch_6x from Chris Hostetter
[ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=45af557 ]
SOLR-10832: Fixed VersionInfo.getMaxVersionFromIndex when using PointsField
with indexed="true"
(cherry picked from commit 274971c3e331b68e5f7ea2669024215b8017ff7a)
> Using "indexed" PointField for _version_ breaks
> VersionInfo.getMaxVersionFromIndex
> ----------------------------------------------------------------------------------
>
> Key: SOLR-10832
> URL: https://issues.apache.org/jira/browse/SOLR-10832
> Project: Solr
> Issue Type: Bug
> Security Level: Public(Default Security Level. Issues are Public)
> Reporter: Hoss Man
> Assignee: Hoss Man
> Attachments: SOLR-10832.patch, SOLR-10832.patch, SOLR-10832.patch
>
>
> If someone configures {{\_version_}} using a {{LongPointField}} which is
> {{indexed="true"}} then {{VersionInfo.getMaxVersionFromIndex()}} will
> incorrectly assume...
> {code}
> // if indexed, then we have terms to get the max from
> if (versionField.indexed()) {
> LeafReader leafReader =
> SlowCompositeReaderWrapper.wrap(searcher.getIndexReader());
> Terms versionTerms = leafReader.terms(versionFieldName);
> Long max = (versionTerms != null) ?
> LegacyNumericUtils.getMaxLong(versionTerms) : null;
> {code}
> ...which will not work because Point based fields have no Terms.
> potential work around: configuring {{\_version_}} to use {{indexed="false"
> docValues="true"}} should cause this branch to be skipped and the existing
> ValueSource/DocValues based fallback to be used.
> We should either:
> * figure out if an alternative option exists for determining the "max" value
> of a LongPointField, and if so use that if {{versionField.indexed() &&
> versionField.getType().isPointField()}}
> * change {{VersionInfo.getAndCheckVersionField()}} to check if the version
> field {{IsPointField()}} and if so error unless {{indexed="false" &&
> docValues="true"}}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]