ModelSearch module
View
A model in the Search module, with 40 members for templates, 37 API properties and 46 members for admin templates.
Templates view
Properties 40
Take no arguments.
-
#
getAvailableFullTextSearchFields() -
array - Gets the list of all available fields for the full-text search (core fields and manually created). If a field is an object, it returns its full path separated by dots, e.g.
tags['name']andtags['slug']are returned astags.nameandtags.slug. Only text fields (or their subfields) are returned. -
#
getAvailableFilterFields() -
array - Gets the list of all available fields for the filtering. If a field is an object, it returns its full path separated by dots, e.g.
tags['name']andtags['slug']are returned astags.nameandtags.slug. Moreover, if a field is a text, the ".keyword" suffix is added as that is the proper way to use them for filtering. It does not include the "relatedRecords" key in a result, but it can be used by default: send it as a filter if it is required. -
#
getAvailableFilterFieldTypes() -
array - Gets the available filter fields that carry a castable type, mapped to that type, for the current index. The type lets a caller interpret a raw filter value correctly — for example, a boolean field so that "1" / "yes" / "on" are treated as the boolean true rather than a string that never matches.
-
#
getAvailableSortFields() -
array - Gets the list of all available fields for the sorting. They are the same as for filtering + "_score" field.
-
#
getFullTextQueryType() -
string - Returns full text query type. Currently, the type of
multi_matchonly. Returns default type (best_fields) or the one search by the exact part of the string (phrase_prefix). -
#
isFullTextQueryTypeChangeable() -
bool - Returns if full text query type can be changed from parameters (e.g. from URL). It is forbidden by default.
-
#
getFullTextSearchFields() -
array - Gets default full text search fields. They look like:
["entityClass" => 1, "name" => 2, "author.displayName" => 3]‒ field name as key and its weight in value. When it returns empty array, Elasticsearch sets fields automatically according to its settings. -
#
isFullTextSearchFieldsChangeable() -
bool - Returns if full text search fields list can be changed from parameters (e.g. from URL). It is allowed by default.
-
#
getChangeableFilterFields() -
array - Gets list of filter fields that can be changed from parameter (e.g. from URL). All available filter fields by default.
-
#
getIgnoreEmptyFilterFields() -
array - Gets list of filter fields that are not applied when they are empty. If
category.name=is passed in parameters and is not listed in this array, only records that have no category will be returned. If it is listed ‒ filtering by "category.name" will be skipped. All available filter fields by default. -
#
getRenderableFilterFields() -
array - Gets a list of filter fields that are renderable, e.g. will be available in the aggregation facets/values in the template. If a field is not changeable but renderable, it is rendered as inactive (disabled). This method is primarily used for the "facets" index to determine which facets should be displayed.
-
#
getSortFields() -
array - Gets sort array. It looks like
["created desc", "name"]. The "asc" could be skipped. -
#
isSortFieldsChangeable() -
bool - Returns if sort can be changed from parameters (e.g. from URL). It is allowed by default.
-
#
getMinimumShouldMatch() -
string - Returns "minimum_should_match" default value. Empty sting means no value is set.
-
#
isMinimumShouldMatchChangeable() -
bool - Returns if "minimum_should_match" can be changed from parameters (e.g. from URL). It is allowed by default.
-
#
isTieBreakerChangeable() -
bool - Returns if tiebreaker can be changed from parameters (e.g. from URL). It is allowed by default.
-
#
isFuzzyChangeable() -
bool - Returns if fuzziness can be changed from parameters (e.g. from URL). It is true by default.
-
#
isPageSizeChangeable() -
bool - Returns if page size can be changed from parameters (e.g. from URL). It is false by default.
-
#
isHighlightFieldsChangeable() -
bool - Returns if highlight be changed from parameters (e.g. from URL). It is true by default.
-
#
getId() -
?int -
#
getIndex() -
?string -
#
getName() -
?string -
#
getSlug() -
?string -
#
getSettings() -
?array -
#
isHierarchicalModel()Not in API & Jobs -
bool - Check whether a model is a hierarchical model, i.e. can have children
No members match the filter.
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 37
Read-only values on the record.
-
#
availableFullTextSearchFields -
array - Gets the list of all available fields for the full-text search (core fields and manually created). If a field is an object, it returns its full path separated by dots, e.g.
tags['name']andtags['slug']are returned astags.nameandtags.slug. Only text fields (or their subfields) are returned. -
#
availableFilterFields -
array - Gets the list of all available fields for the filtering. If a field is an object, it returns its full path separated by dots, e.g.
tags['name']andtags['slug']are returned astags.nameandtags.slug. Moreover, if a field is a text, the ".keyword" suffix is added as that is the proper way to use them for filtering. It does not include the "relatedRecords" key in a result, but it can be used by default: send it as a filter if it is required. -
#
availableFilterFieldTypes -
array - Gets the available filter fields that carry a castable type, mapped to that type, for the current index. The type lets a caller interpret a raw filter value correctly — for example, a boolean field so that "1" / "yes" / "on" are treated as the boolean true rather than a string that never matches.
-
#
availableSortFields -
array - Gets the list of all available fields for the sorting. They are the same as for filtering + "_score" field.
-
#
fullTextQueryType -
string - Returns full text query type. Currently, the type of
multi_matchonly. Returns default type (best_fields) or the one search by the exact part of the string (phrase_prefix). -
#
fullTextQueryTypeChangeable -
bool - Returns if full text query type can be changed from parameters (e.g. from URL). It is forbidden by default.
-
#
fullTextSearchFields -
array - Gets default full text search fields. They look like:
["entityClass" => 1, "name" => 2, "author.displayName" => 3]‒ field name as key and its weight in value. When it returns empty array, Elasticsearch sets fields automatically according to its settings. -
#
fullTextSearchFieldsChangeable -
bool - Returns if full text search fields list can be changed from parameters (e.g. from URL). It is allowed by default.
-
#
changeableFilterFields -
array - Gets list of filter fields that can be changed from parameter (e.g. from URL). All available filter fields by default.
-
#
ignoreEmptyFilterFields -
array - Gets list of filter fields that are not applied when they are empty. If
category.name=is passed in parameters and is not listed in this array, only records that have no category will be returned. If it is listed ‒ filtering by "category.name" will be skipped. All available filter fields by default. -
#
renderableFilterFields -
array - Gets a list of filter fields that are renderable, e.g. will be available in the aggregation facets/values in the template. If a field is not changeable but renderable, it is rendered as inactive (disabled). This method is primarily used for the "facets" index to determine which facets should be displayed.
-
#
sortFields -
array - Gets sort array. It looks like
["created desc", "name"]. The "asc" could be skipped. -
#
sortFieldsChangeable -
bool - Returns if sort can be changed from parameters (e.g. from URL). It is allowed by default.
-
#
minimumShouldMatch -
string - Returns "minimum_should_match" default value. Empty sting means no value is set.
-
#
minimumShouldMatchChangeable -
bool - Returns if "minimum_should_match" can be changed from parameters (e.g. from URL). It is allowed by default.
-
#
tieBreakerChangeable -
bool - Returns if tiebreaker can be changed from parameters (e.g. from URL). It is allowed by default.
-
#
fuzzyChangeable -
bool - Returns if fuzziness can be changed from parameters (e.g. from URL). It is true by default.
-
#
pageSizeChangeable -
bool - Returns if page size can be changed from parameters (e.g. from URL). It is false by default.
-
#
highlightFieldsChangeable -
bool - Returns if highlight be changed from parameters (e.g. from URL). It is true by default.
-
#
id -
?int -
#
index -
?string -
#
name -
?string -
#
slug -
?string -
#
settings -
?array
No members match the filter.
Admin view
AdminAvailable in cdna-admin templates. Copy an admin template into your site repository to change how this record is edited.
Properties 46
Take no arguments.
-
#
getAvailableFullTextSearchFields() -
array - Gets the list of all available fields for the full-text search (core fields and manually created). If a field is an object, it returns its full path separated by dots, e.g.
tags['name']andtags['slug']are returned astags.nameandtags.slug. Only text fields (or their subfields) are returned. -
#
getAvailableFilterFields() -
array - Gets the list of all available fields for the filtering. If a field is an object, it returns its full path separated by dots, e.g.
tags['name']andtags['slug']are returned astags.nameandtags.slug. Moreover, if a field is a text, the ".keyword" suffix is added as that is the proper way to use them for filtering. It does not include the "relatedRecords" key in a result, but it can be used by default: send it as a filter if it is required. -
#
getAvailableFilterFieldTypes() -
array - Gets the available filter fields that carry a castable type, mapped to that type, for the current index. The type lets a caller interpret a raw filter value correctly — for example, a boolean field so that "1" / "yes" / "on" are treated as the boolean true rather than a string that never matches.
-
#
getAvailableSortFields() -
array - Gets the list of all available fields for the sorting. They are the same as for filtering + "_score" field.
-
#
getFullTextQueryType() -
string - Returns full text query type. Currently, the type of
multi_matchonly. Returns default type (best_fields) or the one search by the exact part of the string (phrase_prefix). -
#
isFullTextQueryTypeChangeable() -
bool - Returns if full text query type can be changed from parameters (e.g. from URL). It is forbidden by default.
-
#
getFullTextSearchFields() -
array - Gets default full text search fields. They look like:
["entityClass" => 1, "name" => 2, "author.displayName" => 3]‒ field name as key and its weight in value. When it returns empty array, Elasticsearch sets fields automatically according to its settings. -
#
isFullTextSearchFieldsChangeable() -
bool - Returns if full text search fields list can be changed from parameters (e.g. from URL). It is allowed by default.
-
#
getChangeableFilterFields() -
array - Gets list of filter fields that can be changed from parameter (e.g. from URL). All available filter fields by default.
-
#
getIgnoreEmptyFilterFields() -
array - Gets list of filter fields that are not applied when they are empty. If
category.name=is passed in parameters and is not listed in this array, only records that have no category will be returned. If it is listed ‒ filtering by "category.name" will be skipped. All available filter fields by default. -
#
getRenderableFilterFields() -
array - Gets a list of filter fields that are renderable, e.g. will be available in the aggregation facets/values in the template. If a field is not changeable but renderable, it is rendered as inactive (disabled). This method is primarily used for the "facets" index to determine which facets should be displayed.
-
#
getSortFields() -
array - Gets sort array. It looks like
["created desc", "name"]. The "asc" could be skipped. -
#
isSortFieldsChangeable() -
bool - Returns if sort can be changed from parameters (e.g. from URL). It is allowed by default.
-
#
getMinimumShouldMatch() -
string - Returns "minimum_should_match" default value. Empty sting means no value is set.
-
#
isMinimumShouldMatchChangeable() -
bool - Returns if "minimum_should_match" can be changed from parameters (e.g. from URL). It is allowed by default.
-
#
isTieBreakerChangeable() -
bool - Returns if tiebreaker can be changed from parameters (e.g. from URL). It is allowed by default.
-
#
isFuzzyChangeable() -
bool - Returns if fuzziness can be changed from parameters (e.g. from URL). It is true by default.
-
#
isPageSizeChangeable() -
bool - Returns if page size can be changed from parameters (e.g. from URL). It is false by default.
-
#
isHighlightFieldsChangeable() -
bool - Returns if highlight be changed from parameters (e.g. from URL). It is true by default.
-
#
getId() -
?int -
#
getIndex() -
?string -
#
getName() -
?string -
#
getSlug() -
?string -
#
getSettings() -
?array -
#
isHierarchicalModel()Not in API & Jobs -
bool - Check whether a model is a hierarchical model, i.e. can have children
-
#
getFullTextQueryTypeLabels()Admin only -
array - Returns labels for the full text query type. Returns labels for
multi_match. -
#
getAvailableEntities()Admin only -
array - Returns list of available entities that are supported by the search. Indexed by entity name.
No members match the filter.