Module
MultiMatchQuery
MultiMatchQuery ( fields, qstr )
A Query that allow to more easily build a MatchQuery
over multiple fields
|
Method Summary
Returns | Name | Description |
---|---|---|
String | _type() | The type of ejs object. For internal use only. |
Object | analyzer(analyzer) | Sets the analyzer name used to analyze the Query object. |
Object | boost(boost) | Sets the boost value for documents matching the Query . |
Object | cutoffFrequency(freq) | Sets the maximum threshold/frequency to be considered a low
frequency term in a CommonTermsQuery .
Set to a value between 0 and 1. |
Object | fields(f) | Sets the fields to search across. If passed a single value it is added to the existing list of fields. If passed an array of values, they overwite all existing values. |
Object | fuzziness(fuzz) | Sets the fuzziness value for the Query . |
Object | fuzzyRewrite(m) | Sets fuzzy rewrite method. Valid values are: constant_score_auto - tries to pick the best constant-score rewrite method based on term and document counts from the query scoring_boolean - translates each term into boolean should and keeps the scores as computed by the query constant_score_boolean - same as scoring_boolean, expect no scores are computed. constant_score_filter - first creates a private Filter, by visiting each term in sequence and marking all docs for that term top_terms_boost_N - first translates each term into boolean should and scores are only computed as the boost using the top N scoring terms. Replace N with an integer value. top_terms_N - first translates each term into boolean should and keeps the scores as computed by the query. Only the top N scoring terms are used. Replace N with an integer value. Default is constant_score_auto. This is an advanced option, use with care. |
Object | lenient(trueFalse) | Enables lenient parsing of the query string. |
Object | maxExpansions(e) | Sets the max expansions of a fuzzy Query . |
Object | minimumShouldMatch(minMatch) | Sets a percent value controlling how many "should" clauses in the
resulting Query should match. |
Object | operator(op) | Sets default operator of the Query . Default: or. |
Object | prefixLength(l) | Sets the prefix length for a fuzzy prefix Query . |
Object | query(qstr) | Sets the query string for the Query . |
Object | rewrite(m) | Sets rewrite method. Valid values are: constant_score_auto - tries to pick the best constant-score rewrite method based on term and document counts from the query scoring_boolean - translates each term into boolean should and keeps the scores as computed by the query constant_score_boolean - same as scoring_boolean, expect no scores are computed. constant_score_filter - first creates a private Filter, by visiting each term in sequence and marking all docs for that term top_terms_boost_N - first translates each term into boolean should and scores are only computed as the boost using the top N scoring terms. Replace N with an integer value. top_terms_N - first translates each term into boolean should and keeps the scores as computed by the query. Only the top N scoring terms are used. Replace N with an integer value. Default is constant_score_auto. This is an advanced option, use with care. |
Object | slop(slop) | Sets the default slop for phrases. If zero, then exact phrase matches are required. Default: 0. |
Object | tieBreaker(tieBreaker) | The tie breaker value. The tie breaker capability allows results that include the same term in multiple fields to be judged better than results that include this term in only the best of those multiple fields, without confusing this with the better case of two different terms in the multiple fields. Default: 0.0. |
String | toJSON() | Retrieves the internal query object. This is typically used by
internal API functions so use with caution. |
Object | type(type) | Sets the type of the MultiMatchQuery . Valid values are
boolean, phrase, and phrase_prefix or phrasePrefix. |
Object | useDisMax(trueFalse) | Sets whether or not queries against multiple fields should be combined using Lucene's DisjunctionMaxQuery |
Object | zeroTermsQuery(q) | Sets what happens when no terms match. Valid values are "all" or "none". |
Method Detail
analyzer
Object analyzer ( analyzer )
Sets the analyzer name used to analyze the Query object.
|
boost
Object boost ( boost )
Sets the boost value for documents matching the Query .
|
cutoffFrequency
Object cutoffFrequency ( freq )
Sets the maximum threshold/frequency to be considered a low
frequency term in a CommonTermsQuery .
Set to a value between 0 and 1.
|
fields
Object fields ( f )
Sets the fields to search across. If passed a single value it is
added to the existing list of fields. If passed an array of
values, they overwite all existing values.
|
fuzziness
Object fuzziness ( fuzz )
Sets the fuzziness value for the Query .
|
fuzzyRewrite
Object fuzzyRewrite ( m )
Sets fuzzy rewrite method. Valid values are:
constant_score_auto - tries to pick the best constant-score rewrite
method based on term and document counts from the query
scoring_boolean - translates each term into boolean should and
keeps the scores as computed by the query
constant_score_boolean - same as scoring_boolean, expect no scores
are computed.
constant_score_filter - first creates a private Filter, by visiting
each term in sequence and marking all docs for that term
top_terms_boost_N - first translates each term into boolean should
and scores are only computed as the boost using the top N
scoring terms. Replace N with an integer value.
top_terms_N - first translates each term into boolean should
and keeps the scores as computed by the query. Only the top N
scoring terms are used. Replace N with an integer value.
Default is constant_score_auto.
This is an advanced option, use with care.
|
lenient
Object lenient ( trueFalse )
Enables lenient parsing of the query string.
|
maxExpansions
Object maxExpansions ( e )
Sets the max expansions of a fuzzy Query .
|
minimumShouldMatch
Object minimumShouldMatch ( minMatch )
Sets a percent value controlling how many "should" clauses in the
resulting Query should match.
|
operator
Object operator ( op )
Sets default operator of the Query . Default: or.
|
prefixLength
Object prefixLength ( l )
Sets the prefix length for a fuzzy prefix Query .
|
query
Object query ( qstr )
Sets the query string for the Query .
|
rewrite
Object rewrite ( m )
Sets rewrite method. Valid values are:
constant_score_auto - tries to pick the best constant-score rewrite
method based on term and document counts from the query
scoring_boolean - translates each term into boolean should and
keeps the scores as computed by the query
constant_score_boolean - same as scoring_boolean, expect no scores
are computed.
constant_score_filter - first creates a private Filter, by visiting
each term in sequence and marking all docs for that term
top_terms_boost_N - first translates each term into boolean should
and scores are only computed as the boost using the top N
scoring terms. Replace N with an integer value.
top_terms_N - first translates each term into boolean should
and keeps the scores as computed by the query. Only the top N
scoring terms are used. Replace N with an integer value.
Default is constant_score_auto.
This is an advanced option, use with care.
|
slop
Object slop ( slop )
Sets the default slop for phrases. If zero, then exact phrase matches
are required. Default: 0.
|
tieBreaker
Object tieBreaker ( tieBreaker )
The tie breaker value. The tie breaker capability allows results
that include the same term in multiple fields to be judged better than
results that include this term in only the best of those multiple
fields, without confusing this with the better case of two different
terms in the multiple fields. Default: 0.0.
|
toJSON
String toJSON ( )
Retrieves the internal query object. This is typically used by
internal API functions so use with caution.
|
type
Object type ( type )
Sets the type of the MultiMatchQuery . Valid values are
boolean, phrase, and phrase_prefix or phrasePrefix.
|
useDisMax
Object useDisMax ( trueFalse )
Sets whether or not queries against multiple fields should be combined using Lucene's
DisjunctionMaxQuery
|
zeroTermsQuery
Object zeroTermsQuery ( q )
Sets what happens when no terms match. Valid values are
"all" or "none".
|