ModelSearch module

FacetsIndexField

A model in the Search module, with 33 members for templates, 30 API properties and 40 members for admin templates.

Search\Models\Frontend\FacetsIndexField Search\Models\Api\FacetsIndexField Search\Models\Backend\FacetsIndexField Also in Search: MasterIndexField View
View
What Smarty and Twig templates receive. Properties in REST API responses and job payloads. What admin screen templates receive when you override them.

Templates view

Properties 33

Take no arguments.

# getTypeLabels()
array
Gets all available types with their labels.
# getTypeDisplay()
string
Gets type display label.
# getValuesList()
array
A list of predefined facet values as an array.
# getLabelsList()
array
Key/value list used to transform values to a presentable representation (as an array). For example, a value of "tbc" may want to be displayed as "To Be Confirmed".
# getOrderLabels()
array
Gets all available orders with their labels.
# getOrderDisplay()
string
Gets order display label.
# getOrderMetric()
?string
Gets the metric part of the order (e.g., "_count" or "_key").
# getOrderDirection()
?string
Gets the direction part of the order (e.g., "asc" or "desc").
# getOutputOrderLabels()
array
Gets all available output orders with their labels.
# getOutputOrderDisplay()
string
Gets output order display label.
# getOutputOrderMetric()
?string
Gets the metric part of the output order.
# getOutputOrderDirection()
?string
Gets the direction part of the output order.
# isCaseSensitiveAble()
bool
Returns whether a "case-sensitive" setting is meaningful for this field's type. Only a keyword field carries the case-insensitive normalizer in the Elasticsearch mapping; for any other type the toggle has no mapping effect. Used to hide the toggle in the admin and to decide whether a change forces a rebuild.
# isFulltextAble()
bool
Returns whether a "fulltext" setting is meaningful for this field's type. The "fulltext" flag adds a .text multi-field so a non-analyzed field can ALSO be full-text searched. A text field is already analyzed, so the flag is redundant there; every other type can opt in. Used to hide the toggle in the admin and to decide whether a change forces a rebuild.
# getId()
?int
# getIdentifier()
?string
A unique identifier to represent a field in the search engine.
# getName()
?string
# getType()
?string
The type of the field: * keyword ‒ The value is stored "as is". No analysis is applied. The default type for Faceted Search. * long ‒ Used to store whole numbers, such as ID values. * double ‒ Used to store floating point numbers, such as price. * date ‒ Used to store date fields. * boolean ‒ true / false. * text ‒ Used to store long strings of text for full-text search.
# isFulltext()
bool
When true, a .text subfield of the same field will be created in the Elasticsearch. This is useful when the same field (e.g. of a keyword type) needs to be used as a filter and for fulltext search at the same time.
# isCaseSensitive()
bool
By default, the values are indexed as is, which makes facet values case-sensitive, so a filter query ?size=XL will not find a document with size xl. This behavior can be changed with a case_sensitive property set to false.
# isHidden()
bool
All fields are assumed to be used as filters and appear in search results. If there is no intention to display the facet (perhaps, use this field only for filtering purposes), it can be hidden.
# getLimit()
?int
Defines how many values are returned in the facet.
# getValues()
?string
A list of predefined facet values as a JSON string.
# getLabels()
?string
Key/value list used to transform values to a presentable representation (as a JSON string). For example, a value of "tbc" may want to be displayed as "To Be Confirmed".
# getOrder()
?string
The order facet values are sorted on the return from Elasticsearch. By count, by name.
# getOutputOrder()
?string
The order applied to facet values returned from Elasticsearch. A "post-return" ordering before rendering values.
# getUnit()
?string
Unit of Measure The value can be any string, such as "in" or "mm".
# getProperties()
?string
# getCreated()
?DateTime
Date the record was created.
# getModified()
?DateTime
Last modification date for the record.
# isNewRecord() Not in API & Jobs
bool
Check if the record is a new record
# isHierarchicalModel() Not in API & Jobs
bool
Check whether a model is a hierarchical model, i.e. can have children
# isVersionedModel() Not in API & Jobs
bool
Check whether a model is versioned

API & Jobs view

API & JobsEach property is a key in REST API responses and job payloads. Its name is the template getter without get, is or has. Methods that need arguments are not available here.

Properties 30

Read-only values on the record.

# typeLabels
array
Gets all available types with their labels.
# typeDisplay
string
Gets type display label.
# valuesList
array
A list of predefined facet values as an array.
# labelsList
array
Key/value list used to transform values to a presentable representation (as an array). For example, a value of "tbc" may want to be displayed as "To Be Confirmed".
# orderLabels
array
Gets all available orders with their labels.
# orderDisplay
string
Gets order display label.
# orderMetric
?string
Gets the metric part of the order (e.g., "_count" or "_key").
# orderDirection
?string
Gets the direction part of the order (e.g., "asc" or "desc").
# outputOrderLabels
array
Gets all available output orders with their labels.
# outputOrderDisplay
string
Gets output order display label.
# outputOrderMetric
?string
Gets the metric part of the output order.
# outputOrderDirection
?string
Gets the direction part of the output order.
# caseSensitiveAble
bool
Returns whether a "case-sensitive" setting is meaningful for this field's type. Only a keyword field carries the case-insensitive normalizer in the Elasticsearch mapping; for any other type the toggle has no mapping effect. Used to hide the toggle in the admin and to decide whether a change forces a rebuild.
# fulltextAble
bool
Returns whether a "fulltext" setting is meaningful for this field's type. The "fulltext" flag adds a .text multi-field so a non-analyzed field can ALSO be full-text searched. A text field is already analyzed, so the flag is redundant there; every other type can opt in. Used to hide the toggle in the admin and to decide whether a change forces a rebuild.
# id
?int
# identifier
?string
A unique identifier to represent a field in the search engine.
# name
?string
# type
?string
The type of the field: * keyword ‒ The value is stored "as is". No analysis is applied. The default type for Faceted Search. * long ‒ Used to store whole numbers, such as ID values. * double ‒ Used to store floating point numbers, such as price. * date ‒ Used to store date fields. * boolean ‒ true / false. * text ‒ Used to store long strings of text for full-text search.
# fulltext
bool
When true, a .text subfield of the same field will be created in the Elasticsearch. This is useful when the same field (e.g. of a keyword type) needs to be used as a filter and for fulltext search at the same time.
# caseSensitive
bool
By default, the values are indexed as is, which makes facet values case-sensitive, so a filter query ?size=XL will not find a document with size xl. This behavior can be changed with a case_sensitive property set to false.
# hidden
bool
All fields are assumed to be used as filters and appear in search results. If there is no intention to display the facet (perhaps, use this field only for filtering purposes), it can be hidden.
# limit
?int
Defines how many values are returned in the facet.
# values
?string
A list of predefined facet values as a JSON string.
# labels
?string
Key/value list used to transform values to a presentable representation (as a JSON string). For example, a value of "tbc" may want to be displayed as "To Be Confirmed".
# order
?string
The order facet values are sorted on the return from Elasticsearch. By count, by name.
# outputOrder
?string
The order applied to facet values returned from Elasticsearch. A "post-return" ordering before rendering values.
# unit
?string
Unit of Measure The value can be any string, such as "in" or "mm".
# properties
?string
# created
?DateTime
Date the record was created.
# modified
?DateTime
Last modification date for the record.

Admin view

AdminAvailable in cdna-admin templates. Copy an admin template into your site repository to change how this record is edited.

Properties 40

Take no arguments.

# getTypeLabels()
array
Gets all available types with their labels.
# getTypeDisplay()
string
Gets type display label.
# getValuesList()
array
A list of predefined facet values as an array.
# getLabelsList()
array
Key/value list used to transform values to a presentable representation (as an array). For example, a value of "tbc" may want to be displayed as "To Be Confirmed".
# getOrderLabels()
array
Gets all available orders with their labels.
# getOrderDisplay()
string
Gets order display label.
# getOrderMetric()
?string
Gets the metric part of the order (e.g., "_count" or "_key").
# getOrderDirection()
?string
Gets the direction part of the order (e.g., "asc" or "desc").
# getOutputOrderLabels()
array
Gets all available output orders with their labels.
# getOutputOrderDisplay()
string
Gets output order display label.
# getOutputOrderMetric()
?string
Gets the metric part of the output order.
# getOutputOrderDirection()
?string
Gets the direction part of the output order.
# isCaseSensitiveAble()
bool
Returns whether a "case-sensitive" setting is meaningful for this field's type. Only a keyword field carries the case-insensitive normalizer in the Elasticsearch mapping; for any other type the toggle has no mapping effect. Used to hide the toggle in the admin and to decide whether a change forces a rebuild.
# isFulltextAble()
bool
Returns whether a "fulltext" setting is meaningful for this field's type. The "fulltext" flag adds a .text multi-field so a non-analyzed field can ALSO be full-text searched. A text field is already analyzed, so the flag is redundant there; every other type can opt in. Used to hide the toggle in the admin and to decide whether a change forces a rebuild.
# getId()
?int
# getIdentifier()
?string
A unique identifier to represent a field in the search engine.
# getName()
?string
# getType()
?string
The type of the field: * keyword ‒ The value is stored "as is". No analysis is applied. The default type for Faceted Search. * long ‒ Used to store whole numbers, such as ID values. * double ‒ Used to store floating point numbers, such as price. * date ‒ Used to store date fields. * boolean ‒ true / false. * text ‒ Used to store long strings of text for full-text search.
# isFulltext()
bool
When true, a .text subfield of the same field will be created in the Elasticsearch. This is useful when the same field (e.g. of a keyword type) needs to be used as a filter and for fulltext search at the same time.
# isCaseSensitive()
bool
By default, the values are indexed as is, which makes facet values case-sensitive, so a filter query ?size=XL will not find a document with size xl. This behavior can be changed with a case_sensitive property set to false.
# isHidden()
bool
All fields are assumed to be used as filters and appear in search results. If there is no intention to display the facet (perhaps, use this field only for filtering purposes), it can be hidden.
# getLimit()
?int
Defines how many values are returned in the facet.
# getValues()
?string
A list of predefined facet values as a JSON string.
# getLabels()
?string
Key/value list used to transform values to a presentable representation (as a JSON string). For example, a value of "tbc" may want to be displayed as "To Be Confirmed".
# getOrder()
?string
The order facet values are sorted on the return from Elasticsearch. By count, by name.
# getOutputOrder()
?string
The order applied to facet values returned from Elasticsearch. A "post-return" ordering before rendering values.
# getUnit()
?string
Unit of Measure The value can be any string, such as "in" or "mm".
# getProperties()
?string
# getCreated()
?DateTime
Date the record was created.
# getModified()
?DateTime
Last modification date for the record.
# isNewRecord() Not in API & Jobs
bool
Check if the record is a new record
# isHierarchicalModel() Not in API & Jobs
bool
Check whether a model is a hierarchical model, i.e. can have children
# isVersionedModel() Not in API & Jobs
bool
Check whether a model is versioned
# getFulltextDisplay() Admin only
string
Returns the "Fulltext" value for the manage table: "Yes" / "No", or a dash when the setting does not apply to this field's type.
# getCaseSensitiveDisplay() Admin only
string
Returns the "Case Sensitive" value for the manage table: "Yes" / "No", or a dash when the setting does not apply to this field's type.
# getPredefinedValues() Admin only
string
Formats the stored predefined values and labels as the editable "value::label" per-line text shown in the backend form.
# getEditUrl() Admin only
?string
Get the url for editing the record.
# getDeleteUrl() Admin only
?string
Get the url for deleting the record.
# getManageUrl() Admin only
?string
Get the url for managing records.