You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@gora.apache.org by "Kevin Ratnasekera (JIRA)" <ji...@apache.org> on 2019/03/18 14:09:00 UTC
[jira] [Created] (GORA-555) Improve Lucene query implementation
with NumericRangeQuery
Kevin Ratnasekera created GORA-555:
--------------------------------------
Summary: 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
There performance benefits around NumericRangeQuery. Please notice comment on LuceneQuery implementation.
```
//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);
}
```
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)