Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change default numeric precision_step #5905

Closed
rmuir opened this issue Apr 22, 2014 · 1 comment
Closed

change default numeric precision_step #5905

rmuir opened this issue Apr 22, 2014 · 1 comment

Comments

@rmuir
Copy link
Contributor

rmuir commented Apr 22, 2014

The current precision_step value for all numeric fields is 4. This equates to 8 terms-per-value for 32-bit types, and 16-terms-per-value for 64-bit types. This means these fields are 8x or 16x more costly than a "regular" field (in terms of space/indexing), to accelerate range queries.

The benefit of the lower precision step is to visit less terms during range queries, and these terms will be denser (so smaller integers in the postings lists, but large ones).

Several things in Lucene have changed in the past few years: visiting more terms at query-time is less costly because this is executed per-segment, postings list compression has improved, the term dictionary is faster in general, and terms with only one posting are inlined into the term dictionary.

Furthermore, the speedup has much less benefit when using filters, because in that case it only impacts "uncached" filters. Once cached, its the same either way since it is just a bitset.

I think we should change the default: its just a default. The current default IMO is too aggressive.

There are some benchmarks posted here: https://issues.apache.org/jira/browse/LUCENE-5609

@s1monw
Copy link
Contributor

s1monw commented Apr 23, 2014

this issue needs labels on which branches it goes and what kind of issue it is.

@rmuir rmuir closed this as completed in 8568c18 Apr 23, 2014
rmuir pushed a commit that referenced this issue Apr 23, 2014
Change the default numeric precision_step to 16 for 64-bit types,
8 for 32-bit and 16-bit types. Disable precision_step for the 8-bit
byte type.

Closes #5905
mikemccand pushed a commit to mikemccand/elasticsearch that referenced this issue Apr 24, 2014
Change the default numeric precision_step to 16 for 64-bit types,
8 for 32-bit and 16-bit types. Disable precision_step for the 8-bit
byte type.

Closes elastic#5905
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants