You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@gora.apache.org by "Xavier Sumba (JIRA)" <ji...@apache.org> on 2019/04/02 06:27:00 UTC

[jira] [Commented] (GORA-555) Improve Lucene query implementation with NumericRangeQuery

    [ https://issues.apache.org/jira/browse/GORA-555?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16807433#comment-16807433 ] 

Xavier Sumba commented on GORA-555:
-----------------------------------

Hello, I am working on this issue. I have been reviewing the code and documentation of Gora. I think we can just 1) use instance _of_ to detect the datatype of K or 2) we can add the type to the [mapping file|[https://github.com/apache/gora/blob/master/gora-lucene/src/test/conf/gora-lucene-mapping.xml].] What do you think is an appropriate solution? 

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