apache / apache/lucene

Store NumericField precisionStep in fnx file [LUCENE-3187]

Open
#4,260 1 comment 0 reactions 0 assignees View on GitHub
affects-version:2.9 affects-version:3.0 affects-version:3.1 affects-version:3.2 legacy-jira-priority:Major module:core/index type:enhancement
Dominant language
Java
Stars
3.6k
Forks
1.4k
Avg merge
2d 11h
Merged PRs (30d)
88

Description

This is a similar problem like #4259:

The following question was sent to user list:

The main problem is that you have to pass the precision step and must knwo the field type of numeric fields before doing a query, else you get wrong results. We can maybe store the type and precision step in fnx file (like we do for stored numeric fields in FieldsWriter).

I am not sure whats the best way to do it (without too much code specialization), but it seems a good idea. On the other hand, we don't store references to the Analyzer in the fnx file, so why for numeric field (it's just like an analyzer - if you change it, results are wrong)?

---
Migrated from [LUCENE-3187](https://issues.apache.org/jira/browse/LUCENE-3187) by Uwe Schindler (@uschindler)

Contributor guide

Open the contributing guide

Research direction

Start by comparing this issue with #4259 and reviewing how stored numeric fields are handled in FieldsWriter. Investigate whether the fnx file can persist the numeric field type and precision step without the caller supplying them, and define tests that confirm queries no longer return wrong results when those values are omitted.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
search
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.