Package io.ebean.search
Class TextQueryString
java.lang.Object
io.ebean.search.TextQueryString
public class TextQueryString extends Object
Text query string options.
This maps to an ElasticSearch "query string query".
TextQueryString options = new TextQueryString()
.analyzeWildcard(true)
.fields("name")
.lenient(true)
.opAnd();
List<Customer> customers = database.find(Customer.class)
.text()
.textSimple("quick brown", options)
.findList();
// just use default options
TextQueryString options = new TextQueryString();
List<Customer> customers = database.find(Customer.class)
.text()
.textSimple("quick brown", options)
.findList();
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_FUZZY_MAX_EXPANSIONS -
Constructor Summary
Constructors Constructor Description TextQueryString(String... fields)Construct with the fields to use. -
Method Summary
Modifier and Type Method Description TextQueryStringallowLeadingWildcard(boolean allowLeadingWildcard)Set allow leading wildcard mode.TextQueryStringanalyzer(String analyzer)Set the analyzer.TextQueryStringanalyzeWildcard(boolean analyzeWildcard)Set the analyze wildcard mode.TextQueryStringautoGeneratePhraseQueries(boolean autoGeneratePhraseQueries)Set the auto generate phrase queries mode.TextQueryStringboost(double boost)Set the boost.TextQueryStringdefaultField(String defaultField)Set the default field.static TextQueryStringfields(String... fields)Create with given fields.TextQueryStringfuzziness(String fuzziness)Set fuzziness.TextQueryStringfuzzyMaxExpansions(int fuzzyMaxExpansions)Set fuzzy max expansions.TextQueryStringfuzzyPrefixLength(int fuzzyPrefixLength)Set the fuzzy prefix length.StringgetAnalyzer()Return the analyzer.doublegetBoost()Return the boost.StringgetDefaultField()Return the default field.String[]getFields()Return the fields.StringgetFuzziness()Return the fuzziness.intgetFuzzyMaxExpansions()Return the fuzzy max expansions.intgetFuzzyPrefixLength()Return the fuzzy prefix length.StringgetLocale()Return the locale.StringgetMinShouldMatch()Return the minimum should match.doublegetPhraseSlop()Return the phrase slop.StringgetRewrite()Return the rewrite option.doublegetTieBreaker()Return the tie breaker.StringgetTimeZone()Return the time zone.booleanisAllowLeadingWildcard()Return the allow leading wildcard mode.booleanisAnalyzeWildcard()Return the analyze wildcard mode.booleanisAutoGeneratePhraseQueries()Return the auto generate phase queries mode.booleanisLenient()Return lenient mode.booleanisLowercaseExpandedTerms()Return the lowercase expanded terms mode.booleanisOperatorAnd()Return true if AND is the default operator.booleanisUseDisMax()Return the useDixMax mode.TextQueryStringlenient(boolean lenient)Set lenient mode.TextQueryStringlocale(String locale)Set the locale.TextQueryStringlowercaseExpandedTerms(boolean lowercaseExpandedTerms)Set lowercase expanded terms mode.TextQueryStringminShouldMatch(String minShouldMatch)Set the minimum should match.TextQueryStringopAnd()Use the AND operator (rather than OR).TextQueryStringopOr()Use the OR operator (rather than AND).TextQueryStringphraseSlop(double phraseSlop)Set the phrase slop.TextQueryStringrewrite(String rewrite)Set the rewrite option.TextQueryStringtieBreaker(double tieBreaker)Set tieBreaker option (when multiple fields only).TextQueryStringtimeZone(String timeZone)Set the time zone.TextQueryStringuseDisMax(boolean useDisMax)Set useDisMax option (when multiple fields only).
-
Field Details
-
DEFAULT_FUZZY_MAX_EXPANSIONS
- See Also:
- Constant Field Values
-
-
Constructor Details
-
TextQueryString
Construct with the fields to use.
-
-
Method Details
-
fields
Create with given fields. -
opAnd
Use the AND operator (rather than OR). -
opOr
Use the OR operator (rather than AND). -
locale
Set the locale. -
lenient
Set lenient mode. -
minShouldMatch
Set the minimum should match. -
analyzer
Set the analyzer. -
useDisMax
Set useDisMax option (when multiple fields only). -
tieBreaker
Set tieBreaker option (when multiple fields only). -
defaultField
Set the default field. -
allowLeadingWildcard
Set allow leading wildcard mode. -
lowercaseExpandedTerms
Set lowercase expanded terms mode. -
fuzzyMaxExpansions
Set fuzzy max expansions. -
fuzziness
Set fuzziness. -
fuzzyPrefixLength
Set the fuzzy prefix length. -
phraseSlop
Set the phrase slop. -
boost
Set the boost. -
analyzeWildcard
Set the analyze wildcard mode. -
autoGeneratePhraseQueries
Set the auto generate phrase queries mode. -
timeZone
Set the time zone. -
rewrite
Set the rewrite option. -
getRewrite
Return the rewrite option. -
getFields
Return the fields. -
isOperatorAnd
Return true if AND is the default operator. -
getAnalyzer
Return the analyzer. -
getLocale
Return the locale. -
isLenient
Return lenient mode. -
getMinShouldMatch
Return the minimum should match. -
isUseDisMax
Return the useDixMax mode. -
getTieBreaker
Return the tie breaker. -
getDefaultField
Return the default field. -
isAllowLeadingWildcard
Return the allow leading wildcard mode. -
isLowercaseExpandedTerms
Return the lowercase expanded terms mode. -
getFuzzyMaxExpansions
Return the fuzzy max expansions. -
getFuzziness
Return the fuzziness. -
getFuzzyPrefixLength
Return the fuzzy prefix length. -
getPhraseSlop
Return the phrase slop. -
isAnalyzeWildcard
Return the analyze wildcard mode. -
getBoost
Return the boost. -
isAutoGeneratePhraseQueries
Return the auto generate phase queries mode. -
getTimeZone
Return the time zone.
-