ejsNestedFilter

Nested filters allow you to search against content within objects that are embedded inside of other objects. It is similar to XPath expressions in XML both conceptually and syntactically.

The filter is executed against the nested objects / docs as if they were indexed as separate docs and resulting in the root parent doc (or parent nested mapping).

Module

 NestedFilter

NestedFilter ( path )

Constructs a filter that is capable of executing a filter against objects nested within a document.


Parameters
path <String> The nested object path.

Method Summary

Returns Name Description
String_type()The type of ejs object. For internal use only.
Objectboost(boost)Sets the boost value of the nested Query.
Objectcache(trueFalse)Enable or disable caching of the filter
ObjectcacheKey(key)Sets the cache key.
Objectfilter(oFilter)Sets the nested filter to be executed.
ObjectinnerHits(i)Sets the inner hits options
ObjectinnerHits(i)Sets the inner hits options
Objectjoin(trueFalse)If the nested query should be "joined" with the parent document. Defaults to false.
Objectname(name)Sets the filter name.
Objectpath(p)Sets the root context for the nested filter.
Objectquery(oQuery)Sets the nested query to be executed.
Objectscope(s)Sets the scope of the filter. A scope allows to run facets on the same scope name that will work against the nested documents.
ObjecttoJSON()Returns the filter object.

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 of the nested Query.

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

 cache

Object cache ( trueFalse )
Enable or disable caching of the filter

Parameters
trueFalse <Boolean> True to cache the filter, false otherwise.
Returns
returns this so that calls can be chained.

 cacheKey

Object cacheKey ( key )
Sets the cache key.

Parameters
key <String> the cache key as a string.
Returns
returns this so that calls can be chained.

 filter

Object filter ( oFilter )
Sets the nested filter to be executed.

Parameters
oFilter <Object> A valid Filter object
Returns
returns this so that calls can be chained.

 innerHits

Object innerHits ( i )
Sets the inner hits options

Parameters
i <InnerHits> A valid InnerHits object
Returns
returns this so that calls can be chained.

 innerHits

Object innerHits ( i )
Sets the inner hits options

Parameters
i <InnerHits> A valid InnerHits object
Returns
returns this so that calls can be chained.

 join

Object join ( trueFalse )
If the nested query should be "joined" with the parent document. Defaults to false.

Parameters
trueFalse <Boolean> If the query should be joined or not.
Returns
returns this so that calls can be chained.

 name

Object name ( name )
Sets the filter name.

Parameters
name <String> A name for the filter.
Returns
returns this so that calls can be chained.

 path

Object path ( p )
Sets the root context for the nested filter.

Parameters
p <String> The path defining the root for the nested filter.
Returns
returns this so that calls can be chained.

 query

Object query ( oQuery )
Sets the nested query to be executed.

Parameters
oQuery <Query> A valid Query object
Returns
returns this so that calls can be chained.

 scope

Object scope ( s )
Sets the scope of the filter. A scope allows to run facets on the same scope name that will work against the nested documents.

Deprecated
since elasticsearch 0.90
Parameters
s <String> The scope name as a string.
Returns
returns this so that calls can be chained.

 toJSON

Object toJSON ( )
Returns the filter object.

Returns
filter object

Request

Queries

Filters

Aggregations

Facets

Suggesters

Geo