ejsFieldMaskingSpanQuery

Wrapper to allow SpanQuery objects participate in composite single-field SpanQueries by 'lying' about their search field. That is, the masked SpanQuery will function as normal, but when asked for the field it queries against, it will return the value specified as the masked field vs. the real field used in the wrapped span query.

Module

 FieldMaskingSpanQuery

FieldMaskingSpanQuery ( spanQry, field )
Wraps a SpanQuery and hides the real field being searched across.

Parameters
spanQry <Query> A valid SpanQuery
field <Integer> the maximum field position in a match.

Method Summary

Returns Name Description
String_type()The type of ejs object. For internal use only.
Objectboost(boost)Sets the boost value for documents matching the Query.
Objectfield(f)Sets the value of the "masked" field.
Objectquery(spanQuery)Sets the span query to wrap.
StringtoJSON()Retrieves the internal query object. This is typically used by internal API functions so use with caution.

Method Detail

 _type

String _type ( )
The type of ejs object. For internal use only.

Returns
the type of object

 boost

Object boost ( boost )
Sets the boost value for documents matching the Query.

Parameters
boost <Double> A positive double value.
Returns
returns this so that calls can be chained.

 field

Object field ( f )
Sets the value of the "masked" field.

Parameters
f <String> A field name the wrapped span query should use
Returns
returns this so that calls can be chained.

 query

Object query ( spanQuery )
Sets the span query to wrap.

Parameters
spanQuery <Query> Any valid span type query.
Returns
returns this so that calls can be chained.

 toJSON

String toJSON ( )
Retrieves the internal query object. This is typically used by internal API functions so use with caution.

Returns
returns this object's internal query property.

Request

Queries

Filters

Aggregations

Facets

Suggesters

Geo