Extends
- Backbone.Model
Methods
aliases() → {object}
aliases - Returns a map that matches query field names (key) to a more
human readable alias (value).
Returns:
A map of field names as keys and aliases (string) as values.
- Type
- object
categoriesMap() → {Array.<CategoryMap>}
categoriesMap - Returns an array of objects that can be used to
add a general category and icon to a query field model. Each object
in the array comprises a label (string)
Returns:
Returns an array of objects that define how to categorize fields.
- Type
- Array.<CategoryMap>
defaults() → {object}
Overrides the default Backbone.Model.defaults() function to
specify default attributes for the query fields model
Returns:
- Type
- object
descriptions() → {object}
descriptions - Returns a map that matches query field names (key) to a
more understandable description to use for the field.
Returns:
A map of field names as keys and descriptions (string) as values.
- Type
- object
filterTypesMap() → {object}
filterTypesMap - Returns a map that matches every type of query field
available in the index to the appropriate filter to use
Returns:
Returns an object where the keys are the nodenames of
the filters to use and the values are an array of the associated query types.
The query types in the array must exactly match the query types in the
type attribute of a query field model.
- Type
- object
getCategory() → {object}
getCategory - Finds the matching category for this field based on the
categoriesMap. The function will first check for a matching field name,
and if not found, will match by field type.
Returns:
returns an object with an icon and category property (both strings)
- Type
- object
getFilterType() → {string}
getFilterType - Searches the filterTypesMap and returns the filter type
that is required for this query field
Returns:
The nodeName of the filter that should be used for this query field
- Type
- string
getReadableName() → {string}
getReadableName - Creates and returns a more human-friendly label for the field
Returns:
A humanized alias for the field
- Type
- string
initialize()
initialize - When a new query field is created, set the label, category,
and filterType attributes
isType(type) → {boolean}
isType - Checks if this field is a certian type
Parameters:
Name | Type | Description |
---|---|---|
type |
string | the solr field type |
Returns:
returns true of the field exactly matches
- Type
- boolean
save() → {boolean}
Overwrites the Backbone save function because query fields are read only
Returns:
always returns false
- Type
- boolean