Uploaded image for project: 'Apache Gora'
  1. Apache Gora
  2. GORA-555

Improve Lucene query implementation with NumericRangeQuery

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.8
    • Fix Version/s: 0.9
    • Component/s: gora-lucene
    • Labels:
      None

      Description

      There are 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);
            }
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                c.uent Xavier Sumba
                Reporter:
                djkevincr Kevin Ratnasekera
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 3h 50m
                  3h 50m