IndexRecordFieldMapping
This page provides generated reference documentation for the IndexRecordFieldMapping data model.
A field in a index container
Overview
| Property | Summary |
|---|---|
| systemField | Defines the system field of the index to which this field is mapped. |
| indexFieldType | Defines the type of index field used by this field. |
| additionalFieldNameAliases | Adds one or more additional names (aliases) to the field for the search. |
| isIndexed | Specifies if the content of this field should be indexed. |
| isStored | Specifies if the original content of this field should be stored in the index. |
| isMultiValued | Specifies if the field can contain multiple values for one entry. |
| isBoosted | Marks this field as more important for the search. |
| isGlobalSearchField | Specifies if this field should be included in the global search. |
| isMultiLanguage | Specifies if the index field is multilingual. |
| translationMode | Specifies the method with which the values of the field are translated. |
| translationProcess | The process provides the translations for the value of a field in the specified language. |
| mappingProcess | Process, which provides a mapping for all possible values (keywords) to their respective translations. |
| keepOriginalInput | Defines whether the original input of the field is stored in a separate copy field without special analysis. In this case all special characters are preserved… |
| templateProcess | Defines a process which delivers a template for the index field. |
| boostValue | Multiplies the score for all hits in this field with specified value. |
| boostFunction | Defines the Boost Functions that is used to influence the score based on the actual field value within a document. |
| boostWeight | Gives the used Boost Function a higher/lower importance in score calculation. Default value is 1.0. |
| boostExponent | Exponent for the DEFAULT function. Default value is 0.1 (Boost Value of 2.0 is reached at a field value of 1024). Should always be between 0 and 1. |
| isFilterable | Specifies, whether a field or filterextension is filterable. Filterable fields will be available for selection by a user. |
| isLookupFilter | For a column of the lookup component, specifies whether to search for data in it. That is, if a term is entered in the lookup component, it searches for… |
systemField
Type: EIndexSystemField
Defines the system field of the index to which this field is mapped.
indexFieldType
Type: EIndexFieldType
Requires: systemField property group
Defines the type of index field used by this field.
The field type specifies how the field should be indexed.
Depending on the type, the input values are evaluated differently by the index, which has a major influence on the search.
additionalFieldNameAliases
Type: String[]
Requires: systemField property group
Adds one or more additional names (aliases) to the field for the search.
The field can then be searched for in the global search or directly with this name via JDito.
Several fields, independent of the actual group, can have the same alias.
For example if Person and Organisation specify two different fields that both have the alias name,
both fields are searched when using the pattern name:a*.
isIndexed
Type: Boolean
Default: true
Requires: systemField property group
Specifies if the content of this field should be indexed.
If deactivated the field is not searchable.
NOTE: If a field has neither the indexed nor stored properties, it is not included in the index.
isStored
Type: Boolean
Default: true
Requires: systemField property group
Specifies if the original content of this field should be stored in the index.
If deactivated the field is searchable, but the value is not contained in the result of a search.
NOTE: If a field has neither the indexed nor stored properties, it is not included in the index.
isMultiValued
Type: Boolean
Default: false
Requires: systemField property group
Specifies if the field can contain multiple values for one entry.
Only use this property if a record for this field actually can contain multiple values.
If stored all values are returned in the result.
isBoosted
Type: Boolean
Default: false
Requires: systemField property group
Marks this field as more important for the search.
All values for fields marked as boosted are written in a special system field in the document,
that will rank all hits higher for exact matches (by word).
isGlobalSearchField
Type: Boolean
Default: true
Requires: systemField property group
Specifies if this field should be included in the global search.
If deactivated this field can still be searched when specified directly via name,
but it will no longer be searched if no search fields are specified.
isMultiLanguage
Type: Boolean
Requires: indexFieldType property group
Specifies if the index field is multilingual.
The index only uses the languages that are specified in the property multilingualismIndexSearchLocales of ___CONFIGURATION.
translationMode
Type: EIndexTranslationMode
Requires: isMultiLanguage property group
Specifies the method with which the values of the field are translated.\
INTERN: Directly uses the project's language packs for the translation. The original value of the field is used as the key.\STATIC: Uses a static mapping for the translation, which is set up via themappingProcess. This option is mainly intended for the translation of keywords and values that are as unique as possible. IMPORTANT: The created mapping is kept in the RAM during the entire indexing process. Large amounts of values and large field contents can lead to a memory overflow.\DYNAMIC: Uses the specifiedtranslationProcessfor the translation. IMPORTANT: This option can have a major negative impact on the speed of indexing. The process is called once for each entry in the field for each language for each index document. Reduce ressource heavy executions (e.g. entities.get*) to a minimum.
All translation methods are ignored if atemplateProcessis defined for the field.
translationProcess
Type: String
Requires: translationMode property group
The process provides the translations for the value of a field in the specified language.
The process is called once for each defined language with the corresponding locale.
It should only provide the translation for this language as the return value.
The locale of the target language ($local.locale) and the original value ($local.value) are passed to the process.
IMPORTANT: It is advised to reduce ressource heavy executions (e.g. entities.get*) to a minimum as it can have major negative performance impact as
indexing processes will be called repeatedly!
var locale = vars.get("$local.locale");
var keyword = vars.get("$local.value");
result.string(translate.text(keyword, locale));
mappingProcess
Type: String
Requires: translationMode property group
Process, which provides a mapping for all possible values (keywords) to their respective translations.
This process is called once for each language before indexing.
As result a json object containing the complete mapping for the requested language is expected.
The requested locale of the target language is passed via ($local.locale) to the process.
// the requested language locale
var locale = vars.getString("$local.locale")
// Value of in DB (keyword) -> translation
var mapping = {};
mapping["f"] = translate.text("Female", locale);
mapping["m"] = translate.text("Male", locale);
// possible result for locale 'de'.
var mapping = {
"f":"Weiblich"
"m":"Männlich"
};
keepOriginalInput
Type: Boolean
Default: false
Requires: systemField property group
Defines whether the original input of the field is stored in a separate copy field without special analysis.
In this case all special characters are preserved and can be searched for additionally.
Default is false.
This allows, for example, to search for a value such as a proper name with special characters,
even if the actual field type removes them during indexing.
Example: my@company®
The value can then be found for inputs such as my@* or any® and provide better results for exact matches.
templateProcess
Type: String
Defines a process which delivers a template for the index field.
The process allows to create a composed field using the values of other RecordFields in the document.
The template is generated once before indexing. If the field is multilingual, a template is created for each language of the index.
During indexing, the placeholders in the template are filled with the contents of the fields at the specified position of the indexFieldMappings.
NOTE: The indices of the placeholders start at 0, so the actual position is the number viewed in the recordFieldMappings
editor minus 1, e.g. #TITLE = 2 (editor) - 1 -> actual index 1.
If the field of the template is multilingual, the entries in the corresponding language are adopted from other multilingual fields.
Otherwise, the template will only use the value of the default language.
This option can only be used by single valued fields (isMultiValued == false).
If this field is defined as multilingual (isMultiLangauge == true) all other translation settings are ignored.
The locale of the language can be retrieved via vars.get("$local.locale").
var locale = vars.get("$local.locale");
result.string("{0} {1} | " + translate("Phone", locale) + ": {2} | " + translate("Email", local) + ": {3}");
// result (en): "{0} {1} | Phone: {2} | Email: {3}"
// -> Example: "Lisa Sommer | Phone:123 | Email: l.sommer@domain.local"
boostValue
Type: Double
Default: 1.0
Requires: systemField property group
Multiplies the score for all hits in this field with specified value.
The default is 1.0, for no boost.
Only positive values greater than 0 are allowed.
If a value greater than 1 is specified, hits in this field result in a higher score.
If a value smaller than 1 is specified, e.g. 0.5, they get a lower score.
boostFunction
Type: BoostFunction
Requires: systemField property group
Defines the Boost Functions that is used to influence the score based on the actual field value within a document.
The boost will only be applied is a function is specified.
Default is NULL for no function.
IMPORTANT: Most functions only work with specific field types!\
- DEFAULT: Represents a root function. Defined by the given exponent.
pow(pow(sum(1,field-value),exponent),weight)
This function only supports numerical fields (INTEGER, DOUBLE, LONG).\ - DATE: Represents a reciprocal function that scores more recent dates higher.
This function only supports fields of the type DATE.
boostWeight
Type: Double
Default: 1.0
Requires: boostFunction property group
Gives the used Boost Function a higher/lower importance in score calculation. Default value is 1.0.
boostExponent
Type: Double
Default: 0.1
Requires: boostFunction property group
Exponent for the DEFAULT function. Default value is 0.1 (Boost Value of 2.0 is reached at a field value of 1024). Should always be between 0 and 1.\
- High: Graph gets steeper. Boost value of 2.0 is reached faster.\
- Low: Graph gets flatter. Boost value of 2.0 is reached slower.
isFilterable
Type: Boolean
Default: true
Specifies, whether a field or filterextension is filterable. Filterable fields will be available for selection by a user.
isLookupFilter
Type: Boolean
Default: true
For a column of the lookup component, specifies whether to search for data in it. That is, if a term is entered in the lookup component, it searches for matches in all columns marked as isFilterable.