public static class PhraseQuery.Builder extends Object
Constructor and Description |
---|
Builder()
Sole constructor.
|
Modifier and Type | Method and Description |
---|---|
PhraseQuery.Builder |
add(Term term)
Adds a term to the end of the query phrase.
|
PhraseQuery.Builder |
add(Term term,
int position)
Adds a term to the end of the query phrase.
|
PhraseQuery |
build()
Build a phrase query based on the terms that have been added.
|
PhraseQuery.Builder |
setSlop(int slop)
Set the slop.
|
public PhraseQuery.Builder setSlop(int slop)
PhraseQuery.getSlop()
public PhraseQuery.Builder add(Term term)
public PhraseQuery.Builder add(Term term, int position)
MultiPhraseQuery
instead which only requires one term at each position to match; this class requires
all of them.public PhraseQuery build()
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.