FieldCache.getTermsIndex should cache fasterButMoreRAM=true|false to the same cache key [LUCENE-2527]
Open
affects-version:4.0-ALPHA
legacy-jira-fix-version:4.9
legacy-jira-fix-version:6.0
legacy-jira-priority:Major
module:core/search
type:bug
- Dominant language
- Java
- Stars
- 3.6k
- Forks
- 1.4k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 88
Description
When we cutover FieldCache to use shared byte[] blocks, we added the boolean fasterButMoreRAM option, so you could tradeoff time/space.
It defaults to true.
The thinking is that an expert user, who wants to use false, could pre-populate FieldCache by loading the field with false, and then later when sorting on that field it'd use that same entry.
But there's a bug – when sorting, it then loads a 2nd entry with "true". This is because the Entry.custom in FieldCache participates in equals/hashCode.
---
Migrated from [LUCENE-2527](https://issues.apache.org/jira/browse/LUCENE-2527) by Michael McCandless (@mikemccand), updated May 09 2016
Linked issues:
- #3739
Contributor guide
Assessment
This issue has not been assessed yet.