gora-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin Ratnasekera (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (GORA-555) Improve Lucene query implementation with NumericRangeQuery
Date Mon, 18 Mar 2019 14:14:00 GMT

     [ https://issues.apache.org/jira/browse/GORA-555?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Kevin Ratnasekera updated GORA-555:
-----------------------------------
    Description: 
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}

  was:
There 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}


> 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)

Mime
View raw message