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

Robert Muir commented on LUCENE-6531:
-------------------------------------

Right, I guess I feel there are even more options in addition to what is here. 
For example positions could be relative rather than absolute: in other words 
you provide the gap. 

As far as the builder solution, I think its an interesting option here, because 
we could have a coherent way of solving this across other queries. As far as 
"strongly dislike", my major problems are (as witnessed by codebases using 
them):
* absolute nonsense like "AbstractBuilder"s going with them
* impossible to read code due to chaining/indentation
* loss of standard {{getXXX()}} {{setXXX()}} notation

In my opinion, none of these things are really "related" to builders. Builders 
are an OK tool and if you look in this codebase you will see that they are 
used. Its the "Builder pattern" which drags along all that above shit that is 
truly horrible.


> 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: 6.0
>
>         Attachments: 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