public class TextQuery extends ChangableValueQuery
TextQuery
supports several options for controlling how this text is used, most prominently which fields
should be searched against and if/how proximity searching should be performed. See individual options for more
details.
Constructor and Description |
---|
TextQuery(List<KeyAndBoost> fields,
List<KeyAndBoost> phraseFields,
Integer phraseSlop,
String minimumShouldMatch,
Integer queryPhraseSlop,
String value) |
Modifier and Type | Method and Description |
---|---|
TextQuery |
clone() |
List<KeyAndBoost> |
getFields() |
String |
getMinimumShouldMatch() |
List<KeyAndBoost> |
getPhraseFields() |
Integer |
getPhraseSlop() |
Integer |
getQueryPhraseSlop() |
String |
getValue() |
void |
setFields(List<KeyAndBoost> fields) |
void |
setValue(String value) |
getChildQueries, replaceChildQuery
clone, deepClone
public static final String TYPE
public TextQuery(List<KeyAndBoost> fields, List<KeyAndBoost> phraseFields, Integer phraseSlop, String minimumShouldMatch, Integer queryPhraseSlop, String value)
public List<KeyAndBoost> getFields()
public List<KeyAndBoost> getPhraseFields()
public String getMinimumShouldMatch()
getValue()
must be present for a document to be considered a
match.
May be specified as a positive integer (indicating the number of terms in absolute terms), a negative integer (indicating the number of terms relative to the total), a positive percentage (indicating the percent of query terms that must be present), or a negative percentage (indicting the percent of query terms that may be absent).
If not specified, assumed default is "1"
public Integer getPhraseSlop()
value
. Slop is a measure of how
flexible phrase searches should be in matching documents - each unit of slop represents a movement of one token
relative to another that is needed for a phrase query to match text in an underlying document. The higher the
number, the more forgiving phrase searches are.public Integer getQueryPhraseSlop()
value
. (As
opposed to phraseSlop
which designates the slop used for matching the complete query string).getPhraseSlop()
public void setValue(String value)
setValue
in class ChangableValueQuery
public String getValue()
getValue
in class ChangableValueQuery
public void setFields(List<KeyAndBoost> fields)
public TextQuery clone()
clone
in class ChangableValueQuery