[
https://issues.apache.org/jira/browse/LUCENE-6575?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14594450#comment-14594450
]
Uwe Schindler edited comment on LUCENE-6575 at 6/20/15 7:12 AM:
----------------------------------------------------------------
I am not sure if we should consider adding a static method
{{PhraseQuery#builder()}}, which would make building less verbose? For the
CustomAnalyzer I did this, but people generally have different optinions. -
same applies for {{BooleanQuery#builder()}}.
was (Author: thetaphi):
I am not sure if we should consider adding a static method
{{PhraseQuery#builder()}}, which would make building less verbose? For the
CustomAnalyzer I did this, but people generally have different optinions.
> 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,
> 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: [email protected]
For additional commands, e-mail: [email protected]