Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Won't Fix
-
None
-
None
-
None
-
None
-
New
Description
oal.index.Term has a Term(String field, BytesRef termBytes) constructor. Even though it warns that the term bytes should not be reused, I'm wondering that we should make it more defensive.
* <p>WARNING: the provided BytesRef is not copied, but used directly. * Therefore the bytes should not be modified after construction, for * example, you should clone a copy by {@link BytesRef#deepCopyOf} * rather than pass reused bytes from a TermsEnum.
For example if you have term queries in your query cache and they are modified in-place, it would have very bad consequences and would be hard to diagnose.
Attachments
Attachments
Issue Links
- is duplicated by
-
LUCENE-6316 LRUQueryCache eviction is slow
- Closed
- is superceded by
-
LUCENE-6369 Make queries more defensive and clone deeply
- Closed