ejsHasChildFilter

The has_child filter results in parent documents that have child docs matching the query being returned.

Module

 HasChildFilter

HasChildFilter ( qryOrFltr, type )
Returns results that have child documents matching the filter.

Parameters
qryOrFltr <Object> A valid query or filter object.
type <String> The child type

Method Summary

Returns Name Description
String_type()The type of ejs object. For internal use only.
Objectcache(trueFalse)Enable or disable caching of the filter
ObjectcacheKey(key)Sets the cache key.
Objectfilter(f)Sets the filter
ObjectinnerHits(i)Sets the inner hits options
Objectname(name)Sets the filter name.
Objectquery(q)Sets the query
Objectscope(s)Sets the scope of the filter. A scope allows to run facets on the same scope name that will work against the child documents.
ObjectshortCircuitCutoff(cutoff)Sets the cutoff value to short circuit processing.
ObjecttoJSON()Returns the filter object.
Objecttype(t)Sets the child document type to search against

Method Detail

 _type

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

Returns
the type of object

 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 ( f )
Sets the filter

Since
elasticsearch 0.90
Parameters
f <Query> 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.

 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.

 query

Object query ( q )
Sets the query

Parameters
q <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 child documents.

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

 shortCircuitCutoff

Object shortCircuitCutoff ( cutoff )
Sets the cutoff value to short circuit processing.

Parameters
cutoff <Integer> A positive integer value.
Returns
returns this so that calls can be chained.

 toJSON

Object toJSON ( )
Returns the filter object.

Returns
filter object

 type

Object type ( t )
Sets the child document type to search against

Parameters
t <String> A valid type name
Returns
returns this so that calls can be chained.

Request

Queries

Filters

Aggregations

Facets

Suggesters

Geo