Make ForUtil#BLOCK_SIZE changeable [LUCENE-10319]
- Dominant language
- Java
- Stars
- 3.6k
- Forks
- 1.4k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 88
Description
In #11351, I tried to generate a `ForUtil` whose `BLOCK_SIZE=512`}, I thought it could be simple since it looks like i only need to change the `BLOCK_SIZE`, but it turns out that there are a lot of values related to the `BLOCK_SIZE` but hard coded.
So this approach is trying to make all hard code value related to BLOCK_SIZE to be generated from the `BLOCK_SIZE` in case we need a different `BLOCK_SIZE` `ForUtil` somewhere else or want to change `BLOCK_SIZE` in postings in feature.
I tried to make the `BLOCK_SIZE = 64 / 256` and all tests passed.
---
Migrated from [LUCENE-10319](https://issues.apache.org/jira/browse/LUCENE-10319) by Feng Guo (@gf2121), updated Feb 08 2022
Pull requests: https://github.com/apache/lucene/pull/545
Contributor guide
Research direction
Start with the ForUtil entry point and trace the hard-coded values related to BLOCK_SIZE into the postings code. Compare the behavior for BLOCK_SIZE values 64 and 256, then run the existing test suite; done means those values are generated from BLOCK_SIZE and all tests pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- search
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100