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

Cao Manh Dat commented on LUCENE-6575:
--------------------------------------

It quite hard to find such place for this method. Because it appear in serval 
place from QueryParser, StandardQueryParser to QueryParser of Solr.
I agree that we should keep the public APIs as small as possible. But we move 
slop to Builder to makePhraseQuery immutable so it quite appropriate to have a 
new method to clone PhraseQuery with different slop.

> Improve API of PhraseQuery.Builder
> ----------------------------------
>
>                 Key: LUCENE-6575
>                 URL: https://issues.apache.org/jira/browse/LUCENE-6575
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Cao Manh Dat
>            Priority: Minor
>         Attachments: LUCENE-6575.patch, LUCENE-6575.patch, LUCENE-6575.patch
>
>
> From LUCENE-6531
> In current PhraseQuery.Builder API. User must retype field again and again :
> {code}
> PhraseQuery.Builder builder = new PhraseQuery.Builder();
> builder.add(new Term("lyrics", "when"), 1);
> builder.add(new Term("lyrics", "believe"), 3);
> {code}
> Cleaner API :
> {code}
> PhraseQuery.Builder builder = new PhraseQuery.Builder("lyrics");
> builder.add("when", 1);
> builder.add("believe", 3);
> {code}



--
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