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

Adrien Grand commented on LUCENE-6531:
--------------------------------------

I agree with you it would make the API nicer, it has not been done in this 
issue in order to focus on making PhraseQuery immutable while changing the API 
as little as possible (the only change is that setters moved the the Builder 
class). We can open another issue if we want to improve the API, it's indeed a 
bit weird to expect consumers to provide terms that all have the same field.

> Make PhraseQuery immutable
> --------------------------
>
>                 Key: LUCENE-6531
>                 URL: https://issues.apache.org/jira/browse/LUCENE-6531
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Adrien Grand
>            Assignee: Adrien Grand
>            Priority: Minor
>             Fix For: Trunk
>
>         Attachments: LUCENE-6531.patch, LUCENE-6531.patch
>
>
> Mutable queries are an issue for automatic filter caching since modifying a 
> query after it has been put into the cache will corrupt the cache. We should 
> make all queries immutable (up to the boost) to avoid this issue.



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

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

Reply via email to