Module
DateHistogramFacet
        DateHistogramFacet ( 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 | cacheFilter(trueFalse) | Enables caching of the   | 
    
Object | facetFilter(oFilter) | Allows you to reduce the documents used for computing facet results.  | 
    
Object | factor(f) | The date histogram works on numeric values (since time is stored in milliseconds since the epoch in UTC). 
 But, sometimes, systems will store a different resolution (like seconds since UTC) in a numeric field. The factor parameter can be used to change the value in the field to milliseconds to actual do the relevant rounding, and then be applied again to get to the original unit. For example, when storing in a numeric field seconds resolution, the factor can be set to 1000.  | 
    
Object | field(fieldName) | Sets the field to be used to construct the this facet. | 
Object | global(trueFalse) | Computes values across the entire index  | 
    
Object | interval(timeInterval) | Sets the bucket interval used to calculate the distribution. | 
Object | keyField(fieldName) | Allows you to specify a different key field to be used to group intervals. | 
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: 
 
  | 
    
Object | params(p) | Sets parameters that will be applied to the script. Overwrites any existing params. | 
Object | postOffset(offset) | Set's a specific post-rounding offset. Format is 1d, 1h, etc. | 
Object | postZone(tz) | By default, time values are stored in UTC format. 
 This method allows users to set a time zone value that is then used to compute intervals after rounding on the interval value. The value is an offset from UTC. The tz offset value is simply added to the resulting bucket's date value. 
 For example, to use EST you would set the value to   | 
    
Object | preOffset(offset) | Set's a specific pre-rounding offset. Format is 1d, 1h, etc. | 
Object | preZone(tz) | By default, time values are stored in UTC format. 
 This method allows users to set a time zone value that is then used to compute intervals before rounding on the interval value. The value is an offset from UTC. 
 For example, to use EST you would set the value to   | 
    
Object | preZoneAdjustLargeInterval(trueFalse) | Enables large date interval conversions (day and up). Set to true to enable and then set the   | 
    
Object | scope(scope) | Computes values across the the specified scope  | 
    
Object | timeZone(tz) | By default, time values are stored in UTC format. 
 This method allows users to set a time zone value that is then used 
            to compute intervals before rounding on the interval value. Equalivent to 
             
            
             For example, to use EST you would set the value to   | 
    
String | toJSON() | Retrieves the internal   | 
    
Object | valueField(fieldName) | Allows you to specify a different value field to aggrerate over. | 
Object | valueScript(scriptCode) | Allows you modify the value field using a script. The modified value
            is then used to compute the statistical data. | 
    
Method Detail
cacheFilter
        Object cacheFilter ( trueFalse )
    
    Enables caching of the  
  | 
facetFilter
        Object facetFilter ( oFilter )
    
    Allows you to reduce the documents used for computing facet results. 
  | 
factor
        Object factor ( f )
    
    The date histogram works on numeric values (since time is stored in milliseconds since the epoch in UTC). 
 But, sometimes, systems will store a different resolution (like seconds since UTC) in a numeric field. The factor parameter can be used to change the value in the field to milliseconds to actual do the relevant rounding, and then be applied again to get to the original unit. For example, when storing in a numeric field seconds resolution, the factor can be set to 1000. 
  | 
field
        Object field ( fieldName )
    
    Sets the field to be used to construct the this facet. 
  | 
global
        Object global ( trueFalse )
    
    Computes values across the entire index 
  | 
interval
        Object interval ( timeInterval )
    
    Sets the bucket interval used to calculate the distribution. 
  | 
keyField
        Object keyField ( fieldName )
    
    Allows you to specify a different key field to be used to group intervals. 
  | 
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: 
 
 
  | 
params
        Object params ( p )
    
    Sets parameters that will be applied to the script.  Overwrites 
            any existing params. 
  | 
postOffset
        Object postOffset ( offset )
    
    Set's a specific post-rounding offset.  Format is 1d, 1h, etc. 
  | 
postZone
        Object postZone ( tz )
    
    By default, time values are stored in UTC format. 
 This method allows users to set a time zone value that is then used to compute intervals after rounding on the interval value. The value is an offset from UTC. The tz offset value is simply added to the resulting bucket's date value. 
 For example, to use EST you would set the value to  
  | 
preOffset
        Object preOffset ( offset )
    
    Set's a specific pre-rounding offset.  Format is 1d, 1h, etc. 
  | 
preZone
        Object preZone ( tz )
    
    By default, time values are stored in UTC format. 
 This method allows users to set a time zone value that is then used to compute intervals before rounding on the interval value. The value is an offset from UTC. 
 For example, to use EST you would set the value to  
  | 
preZoneAdjustLargeInterval
        Object preZoneAdjustLargeInterval ( trueFalse )
    
    Enables large date interval conversions (day and up). Set to true to enable and then set the  
  | 
scope
        Object scope ( scope )
    
    Computes values across the the specified scope 
  | 
timeZone
        Object timeZone ( tz )
    
    By default, time values are stored in UTC format. 
 This method allows users to set a time zone value that is then used 
            to compute intervals before rounding on the interval value. Equalivent to 
             
            
             For example, to use EST you would set the value to  
  | 
toJSON
        String toJSON ( )
    
    Retrieves the internal  
  | 
valueField
        Object valueField ( fieldName )
    
    Allows you to specify a different value field to aggrerate over. 
  | 
valueScript
        Object valueScript ( scriptCode )
    
    Allows you modify the  value field using a script. The modified value
            is then used to compute the statistical data.
  |