Module
QueryStringQuery
QueryStringQuery ( qstr )
A query that is parsed using Lucene's default query parser.
|
Method Summary
Returns | Name | Description |
---|---|---|
String | _type() | The type of ejs object. For internal use only. |
Object | allowLeadingWildcard(trueFalse) | Sets whether or not wildcard characters (* and ?) are allowed as the
first character of the Query . Default: true. |
Object | analyzer(analyzer) | Sets the analyzer name used to analyze the Query object. |
Object | analyzeWildcard(trueFalse) | Sets whether or not we should attempt to analyzed wilcard terms in the
Query . By default, wildcard terms are not analyzed.
Analysis of wildcard characters is not perfect. Default: false. |
Object | autoGeneratePhraseQueries(trueFalse) | Sets whether or not we should auto generate phrase queries *if* the analyzer returns more than one term. Default: false. |
Object | boost(boost) | Sets the boost value for documents matching the Query . |
Object | defaultField(fieldName) | Sets the default field/property this query should execute against. |
Object | defaultOperator(op) | Set the default Boolean operator. This operator is used to join individual query
terms when no operator is explicity used in the query string (i.e., this AND that ).
Defaults to OR . |
Object | enablePositionIncrements(trueFalse) | Sets whether or not position increments will be used in the
Query . Default: true. |
Object | escape(trueFalse) | If they query string should be escaped or not. |
Object | fields(fieldNames) | A set of fields/properties this query should execute against. Pass a single value to add to the existing list of fields and pass an array to overwrite all existing fields. For each field, you can apply a field specific boost by appending a ^boost to the field name. For example, title^10, to give the title field a boost of 10. |
Object | fuzzyMaxExpansions(max) | Sets the max number of term expansions for fuzzy queries. |
Object | fuzzyMinSim(minSim) | Set the minimum similarity for fuzzy queries. Default: 0.5. |
Object | fuzzyPrefixLength(fuzzLen) | Sets the prefix length for fuzzy queries. Default: 0. |
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 | lowercaseExpandedTerms(trueFalse) | Sets whether or not terms from wildcard, prefix, fuzzy, and
range queries should automatically be lowercased in the Query
since they are not analyzed. Default: true. |
Object | minimumShouldMatch(minMatch) | Sets a percent value controlling how many "should" clauses in the
resulting Query should match. |
Object | phraseSlop(slop) | Sets the default slop for phrases. If zero, then exact phrase matches are required. Default: 0. |
Object | query(qstr) | Sets the query string on this Query object. |
Object | quoteAnalyzer(analyzer) | Sets the quote analyzer name used to analyze the query
when in quoted text. |
Object | quoteFieldSuffix(s) | Sets the suffix to automatically add to the field name when performing a quoted search. |
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 | tieBreaker(tieBreaker) | Sets the tie breaker value for a Query using
DisMax . 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 | useDisMax(trueFalse) | Sets whether or not queries against multiple fields should be combined using Lucene's DisjunctionMaxQuery |
Method Detail
allowLeadingWildcard
Object allowLeadingWildcard ( trueFalse )
Sets whether or not wildcard characters (* and ?) are allowed as the
first character of the Query . Default: true.
|
analyzer
Object analyzer ( analyzer )
Sets the analyzer name used to analyze the Query object.
|
analyzeWildcard
Object analyzeWildcard ( trueFalse )
Sets whether or not we should attempt to analyzed wilcard terms in the
Query . By default, wildcard terms are not analyzed.
Analysis of wildcard characters is not perfect. Default: false.
|
autoGeneratePhraseQueries
Object autoGeneratePhraseQueries ( trueFalse )
Sets whether or not we should auto generate phrase queries *if* the
analyzer returns more than one term. Default: false.
|
boost
Object boost ( boost )
Sets the boost value for documents matching the Query .
|
defaultField
Object defaultField ( fieldName )
Sets the default field/property this query should execute against.
|
defaultOperator
Object defaultOperator ( op )
Set the default Boolean operator. This operator is used to join individual query
terms when no operator is explicity used in the query string (i.e., this AND that ).
Defaults to OR .
|
enablePositionIncrements
Object enablePositionIncrements ( trueFalse )
Sets whether or not position increments will be used in the
Query . Default: true.
|
escape
Object escape ( trueFalse )
If they query string should be escaped or not.
|
fields
Object fields ( fieldNames )
A set of fields/properties this query should execute against.
Pass a single value to add to the existing list of fields and
pass an array to overwrite all existing fields. For each field,
you can apply a field specific boost by appending a ^boost to the
field name. For example, title^10, to give the title field a
boost of 10.
|
fuzzyMaxExpansions
Object fuzzyMaxExpansions ( max )
Sets the max number of term expansions for fuzzy queries.
|
fuzzyMinSim
Object fuzzyMinSim ( minSim )
Set the minimum similarity for fuzzy queries. Default: 0.5.
|
fuzzyPrefixLength
Object fuzzyPrefixLength ( fuzzLen )
Sets the prefix length for fuzzy queries. Default: 0.
|
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.
|
lowercaseExpandedTerms
Object lowercaseExpandedTerms ( trueFalse )
Sets whether or not terms from wildcard, prefix, fuzzy, and
range queries should automatically be lowercased in the Query
since they are not analyzed. Default: true.
|
minimumShouldMatch
Object minimumShouldMatch ( minMatch )
Sets a percent value controlling how many "should" clauses in the
resulting Query should match.
|
phraseSlop
Object phraseSlop ( slop )
Sets the default slop for phrases. If zero, then exact phrase matches
are required. Default: 0.
|
query
Object query ( qstr )
Sets the query string on this Query object.
|
quoteAnalyzer
Object quoteAnalyzer ( analyzer )
Sets the quote analyzer name used to analyze the query
when in quoted text.
|
quoteFieldSuffix
Object quoteFieldSuffix ( s )
Sets the suffix to automatically add to the field name when
performing a quoted search.
|
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.
|
tieBreaker
Object tieBreaker ( tieBreaker )
Sets the tie breaker value for a Query using
DisMax . 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.
|
useDisMax
Object useDisMax ( trueFalse )
Sets whether or not queries against multiple fields should be combined using Lucene's
DisjunctionMaxQuery
|