Module
TopHitsAggregation
TopHitsAggregation ( name )
top_hits metric aggregator keeps track of the most relevant document being aggregated.
|
Method Summary
Returns | Name | Description |
---|---|---|
String | _type() | The type of ejs object. For internal use only. |
Object | agg(agg) | Add a nesated aggregation. This method can be called multiple times in order to set multiple nested aggregations what will be executed at the same time as the parent aggregation. Alias for the aggregation method. |
Object | aggregation(agg) | Add a nesated aggregation. This method can be called multiple times in order to set multiple nested aggregations what will be executed at the same time as the parent aggregation. |
Object | explain(trueFalse) | Enable/Disable explanation of score for each hi. |
Object | fieldDataFields(Fields) | Allows to return the field data representation of a field for each hit. |
Object | from(from) | The offset from the first result you want to fetch. |
Object | highlight(h) | Performs highlighting based on the |
Object | scriptField(oScriptField) | Computes a document property dynamically based on the supplied |
Object | size(size) | Sets the maximum number of top matching hits to return per bucket. |
Object | sort(sort) | The maximum number of top matching hits to return per bucket. |
Object | source(includes,excludes) | 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. |
String | toJSON() | Retrieves the internal |
Object | trackScores(trueFalse) | Enables score computation and tracking during sorting. By default, sorting scores are not computed. |
Object | version(trueFalse) | Enable/Disable returning version number for each hit. |
Method Detail
agg
Object agg ( agg )
Add a nesated aggregation. This method can be called multiple times
in order to set multiple nested aggregations what will be executed
at the same time as the parent aggregation. Alias for the
aggregation method.
|
aggregation
Object aggregation ( agg )
Add a nesated aggregation. This method can be called multiple times
in order to set multiple nested aggregations what will be executed
at the same time as the parent aggregation.
|
explain
Object explain ( trueFalse )
Enable/Disable explanation of score for each hi.
|
fieldDataFields
Object fieldDataFields ( Fields )
Allows to return the field data representation of a field for each hit.
|
from
Object from ( from )
The offset from the first result you want to fetch.
|
highlight
Object highlight ( h )
Performs highlighting based on the
|
scriptField
Object scriptField ( oScriptField )
Computes a document property dynamically based on the supplied
|
size
Object size ( size )
Sets the maximum number of top matching hits to return per bucket.
|
sort
Object sort ( sort )
The maximum number of top matching hits to return per bucket.
|
source
Object source ( includes, excludes )
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.
|
toJSON
String toJSON ( )
Retrieves the internal
|
trackScores
Object trackScores ( trueFalse )
Enables score computation and tracking during sorting. By default, sorting scores are not computed.
|
version
Object version ( trueFalse )
Enable/Disable returning version number for each hit.
|