Module
TermStatsFacet
        TermStatsFacet ( name )
    
    A facet which computes statistical data based on an aggregate key. 
  | 
Method Summary
| Returns | Name | Description | 
|---|---|---|
String | _type() | The type of ejs object. For internal use only. | 
Object | allTerms(trueFalse) | Allows you to return all terms, even if the frequency count is 0. This should not be used on fields that contain a large number of unique terms because it could cause out-of-memory errors.  | 
    
Object | cacheFilter(trueFalse) | Enables caching of the   | 
    
Object | facetFilter(oFilter) | Allows you to reduce the documents used for computing facet results.  | 
    
Object | global(trueFalse) | Computes values across the entire index  | 
    
Object | keyField(fieldName) | Sets the field which will be used to pivot on (group-by). | 
Object | lang(language) | The script language being used. Currently supported values are
            javascript, groovy, and mvel. | 
    
Object | mode(m) | Sets the mode the facet will use. 
 
  | 
    
Object | nested(path) | Sets the path to the nested document if faceting against a nested field.  | 
    
Object | order(o) | Sets the type of ordering that will be performed on the date buckets. Valid values are: count - default, sort by the number of items in the bucket term - sort by term value. reverse_count - reverse sort of the number of items in the bucket reverse_term - reverse sort of the term value. total - sorts by the total value of the bucket contents reverse_total - reverse sort of the total value of bucket contents min - the minimum value in the bucket reverse_min - the reverse sort of the minimum value max - the maximum value in the bucket reverse_max - the reverse sort of the maximum value mean - the mean value of the bucket contents reverse_mean - the reverse sort of the mean value of bucket contents. | 
Object | params(oParams) | Allows you to set script parameters to be used during the execution of the script. | 
Object | scope(scope) | Computes values across the the specified scope  | 
    
Object | scriptField(script) | Sets a script that will provide the terms for a given document. | 
Object | size(facetSize) | Sets the number of facet entries that will be returned for this facet. For instance, you might ask for only the top 5 aggregate keys although there might be hundreds of unique keys. Higher settings could cause memory strain. | 
String | toJSON() | Retrieves the internal   | 
    
Object | valueField(fieldName) | Sets the field for which statistical information will be generated. | 
Object | valueScript(code) | Define a script to evaluate of which the result will be used to generate the statistical information. | 
Method Detail
allTerms
        Object allTerms ( trueFalse )
    
    Allows you to return all terms, even if the frequency count is 0. This should not be used on fields that contain a large number of unique terms because it could cause out-of-memory errors. 
  | 
cacheFilter
        Object cacheFilter ( trueFalse )
    
    Enables caching of the  
  | 
facetFilter
        Object facetFilter ( oFilter )
    
    Allows you to reduce the documents used for computing facet results. 
  | 
global
        Object global ( trueFalse )
    
    Computes values across the entire index 
  | 
keyField
        Object keyField ( fieldName )
    
    Sets the field which will be used to pivot on (group-by). 
  | 
lang
        Object lang ( language )
    
    The script language being used. Currently supported values are
             javascript, groovy, and mvel.
  | 
mode
        Object mode ( m )
    
    Sets the mode the facet will use. 
 
 
  | 
nested
        Object nested ( path )
    
    Sets the path to the nested document if faceting against a nested field. 
  | 
order
        Object order ( o )
    
    Sets the type of ordering that will be performed on the date
            buckets.  Valid values are:
            
            count - default, sort by the number of items in the bucket
            term - sort by term value.
            reverse_count - reverse sort of the number of items in the bucket
            reverse_term - reverse sort of the term value.
            total - sorts by the total value of the bucket contents
            reverse_total - reverse sort of the total value of bucket contents
            min - the minimum value in the bucket
            reverse_min - the reverse sort of the minimum value
            max - the maximum value in the bucket
            reverse_max - the reverse sort of the maximum value
            mean - the mean value of the bucket contents
            reverse_mean - the reverse sort of the mean value of bucket contents. 
  | 
params
        Object params ( oParams )
    
    Allows you to set script parameters to be used during the execution of the script. 
  | 
scope
        Object scope ( scope )
    
    Computes values across the the specified scope 
  | 
scriptField
        Object scriptField ( script )
    
    Sets a script that will provide the terms for a given document. 
  | 
size
        Object size ( facetSize )
    
    Sets the number of facet entries that will be returned for this facet. For instance, you
            might ask for only the top 5 aggregate keys although there might be hundreds of
            unique keys. Higher settings could cause memory strain. 
  | 
toJSON
        String toJSON ( )
    
    Retrieves the internal  
  | 
valueField
        Object valueField ( fieldName )
    
    Sets the field for which statistical information will be generated. 
  | 
valueScript
        Object valueScript ( code )
    
    Define a script to evaluate of which the result will be used to generate
            the statistical information. 
  |