[ https://issues.apache.org/jira/browse/GORA-555?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16807455#comment-16807455 ]
Kevin Ratnasekera commented on GORA-555: ---------------------------------------- [~c.uent] The idea here is, right now in current implementation whatever the Key type is, it's getting converted to java.lang.String before the query construction and execution. Purpose of this ticket is to avoid that conversion, use that Key type native as it is ( without conversion ), using Lucene query to take performance benefits. ( If Lucene query does support that for given Key type ) Also you need to check whether current implementation seamlessly work for Key types other than String Eg:- Long once you do that changes. We will review once you come up PR/ [~lewismc] Is there anything we should add here? > 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)