Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-6930

Decouple GeoPointField from NumericType

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 5.5, trunk
    • Component/s: modules/spatial
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      GeoPointField currently relies on NumericTokenStream to create prefix terms for a GeoPoint using the precision step defined in GeoPointField. At search time GeoPointTermsEnum recurses to a max precision that is computed by the Query parameters. This max precision is never the full precision, so creating and indexing the full precision terms is useless and wasteful (it was always a side effect of just using indexing logic from the Numeric type).

      Furthermore, since the numerical logic always stored high precision terms first, the recursion in GeoPointTermsEnum required transient memory for storing ranges. By moving the trie logic to its own GeoPointTokenStream and reversing the term order (such that lower resolution terms are first), the GeoPointTermsEnum can naturally traverse, enabling on-demand creation of PrefixTerms. This will be done in a separate issue.

        Attachments

        1. LUCENE-6930.patch
          117 kB
          Nicholas Knize
        2. LUCENE-6930.patch
          115 kB
          Nicholas Knize
        3. LUCENE-6930.patch
          121 kB
          Nicholas Knize
        4. LUCENE-6930.patch
          120 kB
          Nicholas Knize
        5. LUCENE-6930.patch
          100 kB
          Nicholas Knize
        6. LUCENE-6930.patch
          84 kB
          Nicholas Knize

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              nknize Nicholas Knize
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: