Module
TermsFacet
        TermsFacet ( name )
    
    A facet which returns the N most frequent terms within a collection or set of collections. 
  | 
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 | exclude(exclude) | Allows you to filter out unwanted facet entries. When passed a single term, it is appended to the list of currently excluded terms. If passed an array, it overwrites all existing values.  | 
    
Object | executionHint(h) | Sets the execution hint determines how the facet is computed. Currently only supported value is "map". | 
Object | facetFilter(oFilter) | Allows you to reduce the documents used for computing facet results.  | 
    
Object | field(fieldName) | Sets the field to be used to construct the this facet. Set to _index to return a facet count of hits per _index the search was executed on. | 
Object | fields(aFieldName) | Aggregate statistical info across a set of fields. | 
Object | global(trueFalse) | Computes values across the entire index  | 
    
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. | 
Object | params(p) | Sets parameters that will be applied to the script. Overwrites any existing params. | 
Object | regex(exp) | Allows you to only include facet entries matching a specified regular expression.  | 
    
Object | regexFlags(flags) | Allows you to set the regular expression flags to be used
            with the   | 
    
Object | scope(scope) | Computes values across the the specified scope  | 
    
Object | script(scriptCode) | Allows you modify the term using a script. The modified value is then used in the facet collection. | 
Object | scriptField(script) | Sets a script that will provide the terms for a given document. | 
Object | shardSize(shardSize) | Determines how many terms the coordinating node will request from each shard. | 
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 authors although there might be hundreds of
            unique authors. | 
    
String | toJSON() | Retrieves the internal   | 
    
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  
  | 
exclude
        Object exclude ( exclude )
    
    Allows you to filter out unwanted facet entries. When passed a single term, it is appended to the list of currently excluded terms. If passed an array, it overwrites all existing values. 
  | 
executionHint
        Object executionHint ( h )
    
    Sets the execution hint determines how the facet is computed.
            Currently only supported value is "map". 
  | 
facetFilter
        Object facetFilter ( oFilter )
    
    Allows you to reduce the documents used for computing facet results. 
  | 
field
        Object field ( fieldName )
    
    Sets the field to be used to construct the this facet.  Set to
            _index to return a facet count of hits per _index the search was
            executed on. 
  | 
fields
        Object fields ( aFieldName )
    
    Aggregate statistical info across a set of fields. 
  | 
global
        Object global ( trueFalse )
    
    Computes values across the entire index 
  | 
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. 
  | 
params
        Object params ( p )
    
    Sets parameters that will be applied to the script.  Overwrites
            any existing params. 
  | 
regex
        Object regex ( exp )
    
    Allows you to only include facet entries matching a specified regular expression. 
  | 
regexFlags
        Object regexFlags ( flags )
    
    Allows you to set the regular expression flags to be used
            with the  
  | 
scope
        Object scope ( scope )
    
    Computes values across the the specified scope 
  | 
script
        Object script ( scriptCode )
    
    Allows you modify the term using a script. The modified value
            is then used in the facet collection. 
  | 
scriptField
        Object scriptField ( script )
    
    Sets a script that will provide the terms for a given document. 
  | 
shardSize
        Object shardSize ( shardSize )
    
    Determines how many terms the coordinating node will request from
            each shard. 
  | 
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  authors although there might be hundreds of
            unique authors.
  | 
toJSON
        String toJSON ( )
    
    Retrieves the internal  
  |