[
https://issues.apache.org/jira/browse/LUCENE-6930?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15109247#comment-15109247
]
Michael McCandless commented on LUCENE-6930:
--------------------------------------------
It's odd that we pass {{GeoPointTermQuery}} down to {{GeoPointTermsEnum}}
ctor which then goes and secretly sets a field:
{noformat}
query.cellComparator.termEnum = this;
{noformat}
Can we make {{GeoPointTermQuery}} package private again, and do this
"up above"? And put {{TermEncoding}} somewhere else to be public?
Can we rename {{GeoPointTermQuery}} to {{GeoPointMultiTermQuery}}?
In the javadocs for {{TermEncoding}}'s two options can you explain
that one is newer and smaller/faster than the other, which is now
"legacy" ({{NUMERIC}})? Can we deprecate the {{NUMERIC}} one?
In {{GeoPointTermsEnum.newInstance}} can we change:
{noformat}
if (query.termEncoding == GeoPointTermQuery.TermEncoding.PREFIX) {
return new GeoPointPrefixTermsEnum(terms, query);
}
return new GeoPointNumericTermsEnum(terms, query);
{noformat}
to e.g.:
{noformat}
if (query.termEncoding == GeoPointTermQuery.TermEncoding.PREFIX) {
return new GeoPointPrefixTermsEnum(terms, query);
} else if (query.termEncoding == GeoPointTermQuery.TermEncoding.NUMERIC) {
return new GeoPointNumericTermsEnum(terms, query);
} else {
throw new IllegalArgumentException(...);
}
{noformat}
> Decouple GeoPointField from NumericType
> ---------------------------------------
>
> Key: LUCENE-6930
> URL: https://issues.apache.org/jira/browse/LUCENE-6930
> Project: Lucene - Core
> Issue Type: Improvement
> Reporter: Nicholas Knize
> Attachments: LUCENE-6930.patch, LUCENE-6930.patch
>
>
> {{GeoPointField}} currently relies on {{NumericTokenStream}} to create prefix
> terms for a GeoPoint using the precision step defined in {{GeoPointField}}.
> At search time {{GeoPointTermsEnum}} recurses to a max precision that is
> computed by the Query parameters. This max precision is never the full
> precision, so creating and indexing the full precision terms is useless and
> wasteful (it was always a side effect of just using indexing logic from the
> Numeric type).
> Furthermore, since the numerical logic always stored high precision terms
> first, the recursion in {{GeoPointTermsEnum}} required transient memory for
> storing ranges. By moving the trie logic to its own {{GeoPointTokenStream}}
> and reversing the term order (such that lower resolution terms are first),
> the GeoPointTermsEnum can naturally traverse, enabling on-demand creation of
> PrefixTerms. This will be done in a separate issue.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]