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

Set default precisionStep for NumericField and NumericRangeFilter

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.9
    • Fix Version/s: 2.9
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      This is a spinoff from LUCENE-1701.

      A user using Numeric* should not need to understand what's
      "under the hood" in order to do their indexing & searching.

      They should be able to simply:

      doc.add(new NumericField("price", 15.50);
      

      And have a decent default precisionStep selected for them.

      Actually, if we add ctors to NumericField for each of the supported
      types (so the above code works), we can set the default per-type. I
      think we should do that?

      4 for int and 6 for long was proposed as good defaults.

      The default need not be "perfect", as advanced users can always
      optimize their precisionStep, and for users experiencing slow
      RangeQuery performance, NumericRangeQuery with any of the defaults we
      are discussing will be much faster.

        Attachments

        1. LUCENE-1712.patch
          41 kB
          Uwe Schindler
        2. LUCENE-1712.patch
          29 kB
          Uwe Schindler

          Activity

            People

            • Assignee:
              thetaphi Uwe Schindler
              Reporter:
              mikemccand Michael McCandless
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: