ejsSpanNearQuery

A spanNearQuery will look to find a number of spanQuerys within a given distance from each other.

Module

 SpanNearQuery

SpanNearQuery ( clauses, slop )
Matches spans which are near one another.

Parameters
clauses <Query | Query[]> A single SpanQuery or array of SpanQueries
slop <Integer> The number of intervening unmatched positions

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.
Objectclauses(clauses)Sets the clauses used. If passed a single SpanQuery, it is added to the existing list of clauses. If passed an array of SpanQueries, they replace any existing clauses.
ObjectcollectPayloads(trueFalse)Sets whether or not payloads are being used. A payload is an arbitrary byte array stored at a specific position (i.e. token/term).
ObjectinOrder(trueFalse)Sets whether or not matches are required to be in-order.
Objectslop(distance)Sets the maximum number of intervening unmatched positions.
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.

 clauses

Object clauses ( clauses )
Sets the clauses used. If passed a single SpanQuery, it is added to the existing list of clauses. If passed an array of SpanQueries, they replace any existing clauses.

Parameters
clauses <Query | Query[]> A SpanQuery or array of SpanQueries.
Returns
returns this so that calls can be chained.

 collectPayloads

Object collectPayloads ( trueFalse )
Sets whether or not payloads are being used. A payload is an arbitrary byte array stored at a specific position (i.e. token/term).

Parameters
trueFalse <Boolean> Whether or not to return payloads.
Returns
returns this so that calls can be chained.

 inOrder

Object inOrder ( trueFalse )
Sets whether or not matches are required to be in-order.

Parameters
trueFalse <Boolean> Determines if matches must be in-order.
Returns
returns this so that calls can be chained.

 slop

Object slop ( distance )
Sets the maximum number of intervening unmatched positions.

Parameters
distance <Number> The number of intervening unmatched positions.
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