lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cao Manh Dat (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (LUCENE-6575) Improve API of PhraseQuery.Builder
Date Tue, 16 Jun 2015 23:58:00 GMT

     [ https://issues.apache.org/jira/browse/LUCENE-6575?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Cao Manh Dat updated LUCENE-6575:
---------------------------------
    Description: 
>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}

  was:
>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", "drug"), 1);
builder.add(new Term("lyrics", "drug"), 4);
{code}


> 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
>
>
> 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-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message