ejsPartialField

When loading data from _source, partial fields can be used to use wildcards to control what part of the _source will be loaded based on include and exclude patterns.

Module

 PartialField

PartialField ( fieldName )

Control what part of the _source will be loaded.


Parameters
fieldName <String> A name of the partial field to create.

Method Summary

Returns Name Description
String_type()The type of ejs object. For internal use only.
Objectexclude(exclude)Allows to control how the _source field is returned with every hit. By default operations return the contents of the _source field unless you have used the fields parameter or if the _source field is disabled. Set the includes parameter to false to completely disable returning the source field.
Objectinclude(include)Allows to control how the _source field is returned with every hit. By default operations return the contents of the _source field unless you have used the fields parameter or if the _source field is disabled. Set the includes parameter to false to completely disable returning the source field.
StringtoJSON()Retrieves the internal script 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

 exclude

Object exclude ( exclude )
Allows to control how the _source field is returned with every hit. By default operations return the contents of the _source field unless you have used the fields parameter or if the _source field is disabled. Set the includes parameter to false to completely disable returning the source field.

Parameters
exclude <String | String[]> The optional field or list of fields to exclude.
Returns
returns this so that calls can be chained.

 include

Object include ( include )
Allows to control how the _source field is returned with every hit. By default operations return the contents of the _source field unless you have used the fields parameter or if the _source field is disabled. Set the includes parameter to false to completely disable returning the source field.

Parameters
include <String | String[]> The field or list of fields to include as array.
Returns
returns this so that calls can be chained.

 toJSON

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

Returns
returns this object's internal facet property.

Request

Queries

Filters

Aggregations

Facets

Suggesters

Geo