[
https://issues.apache.org/jira/browse/GORA-555?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16807595#comment-16807595
]
Xavier Sumba commented on GORA-555:
-----------------------------------
Thanks for your answer, sounds good! I will look into it. Just for the record,
the class was
[deprecated|https://lucene.apache.org/core/6_0_0/core/org/apache/lucene/search/LegacyNumericRangeQuery.html]
in Lucene 6.
This is the correct [set of
classes|https://lucene.apache.org/core/8_0_0/core/org/apache/lucene/index/PointValues.html]
to use.
> Improve Lucene query implementation with NumericRangeQuery
> -----------------------------------------------------------
>
> Key: GORA-555
> URL: https://issues.apache.org/jira/browse/GORA-555
> Project: Apache Gora
> Issue Type: Improvement
> Reporter: Kevin Ratnasekera
> Priority: Major
>
> There are performance benefits around NumericRangeQuery. Please notice
> comment on LuceneQuery implementation.
> {code}
> //TODO: Change this to a NumericRangeQuery when necessary (it's faster)
> String lower = null;
> String upper = null;
> if (getStartKey() != null) {
> //Do we need to escape the term?
> lower = getStartKey().toString();
> }
> if (getEndKey() != null) {
> upper = getEndKey().toString();
> }
> if (upper == null && lower == null) {
> q = new MatchAllDocsQuery();
> } else {
> q = TermRangeQuery.newStringRange(pk, lower, upper, true, true);
> }
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)