Skip to content

Improve API of PhraseQuery.Builder [LUCENE-6575] #7633

@asfimport

Description

@asfimport

From #7589
In current PhraseQuery.Builder API. User must retype field again and again :

PhraseQuery.Builder builder = new PhraseQuery.Builder();
builder.add(new Term("lyrics", "when"), 1);
builder.add(new Term("lyrics", "believe"), 3);

Cleaner API :

PhraseQuery.Builder builder = new PhraseQuery.Builder("lyrics");
builder.add("when", 1);
builder.add("believe", 3);

Migrated from LUCENE-6575 by Cao Manh Dat (@CaoManhDat), updated Jun 22 2015
Attachments: LUCENE-6575.patch (versions: 5)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions