lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Elschot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LUCENE-6821) TermQuery's constructors should clone the incoming term
Date Sat, 03 Oct 2015 08:53:26 GMT

    [ https://issues.apache.org/jira/browse/LUCENE-6821?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14942191#comment-14942191
] 

Paul Elschot commented on LUCENE-6821:
--------------------------------------

I had a look at the core code for the use of the TermQuery constructors, and I agree that
it would be better to do the clone in the constructor.
Shall I give this a try?

> TermQuery's constructors should clone the incoming term
> -------------------------------------------------------
>
>                 Key: LUCENE-6821
>                 URL: https://issues.apache.org/jira/browse/LUCENE-6821
>             Project: Lucene - Core
>          Issue Type: Task
>            Reporter: Adrien Grand
>            Priority: Minor
>
> This is a follow-up of LUCENE-6435: the bug stems from the fact that you can build term
queries out of shared BytesRef objects (such as the ones returned by TermsEnum.next), which
is a bit trappy. If TermQuery's constructors would clone the incoming term, we wouldn't have
this trap.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message