apache / apache/lucene

FieldCache.getTermsIndex should cache fasterButMoreRAM=true|false to the same cache key [LUCENE-2527]

Open
#3,601 5 comments 0 reactions 1 assignee Claimed by @mikemccand View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.