Data model expansion is the automatic generation of index schema elements (index fields, categories, processing, and mappings) as well as search logic elements (prefix handlers, hit meta, and facets) when defining a property in a data model class.
When you apply a configuration, the high-level view provided by the Data Model is expanded into the multiple index and search elements.
The properties that you define generate:
• Normalization and semantic processing instructions (for alphanumeric fields or facets only). These instructions are contained in semantic processors that are automatically configured and added to the analysis pipeline.
• New dedicated index fields and category facets mapping document metas in the index schema.
• Storage settings of index fields in the index schema.
• Instructions saying whether to allow full-text search on index fields and search with prefix handlers. For example, the query title: Recipes with the title: prefix handler search for documents having Recipes in their titles).
• The corresponding hit meta and hit facets to display in the search results, and prefix handlers in the search logic.
Figure 4. Typical Data Model Expansion
For example, creating an alphanumeric property called name in a customer class expands into the following:
Phase
generates...
in...
Data Processing
A customer_name output context that you can manage to transform/normalize your data before indexation.
Data Processing > Document Processors/ Semantic Processors
Mapping
A mapping from the customer_name output context to the customer_name field.
If sales is not the default class, the output context name would instead be customer_name.
If the customer_name property is to be both an index field and a facet, the data model creates two customer_nameoutput contexts, with one mapped to the category, the other mapped to the index field.
Data Processing > Mappings
Index schema
An index field of type text called customer_name.
Data model > Advanced Schema
Search Query
A prefix handler called customer_name that targets the customer_name index field.
Search Logics > Query Language
Search Results
A facet named customer_name.
Search Logics > Facets
A hit meta named customer_name. At search time, this meta is automatically renamed to name so the class name (customer) does not appear in the hit content.
Search Logics > Hit Content
Controlling the Data Model Expansion
The Data Model simplifies the setup of the most common features for index fields and category facets. But you may need to control the default behavior of the Data Model expansion, or customize specific elements only.
Controlling the Overall Data Model Expansion
1. In the Administration Console, go to Index > Data Model.
2. Expand Default expansion control.
Default Expansion Control Options
Option
Description
Generate analysis config
Creates the required mappings and document processors for each property.
Only clear this option to take complete control over analysis expansion.
Generate index schema
Creates the required dedicated index fields for each property set as Dedicated field.
Only clear this option to take complete control over index schema expansion.
Generate facet
Creates a category facet in the search logics for each property set as Category facet.
Only clear this option to take complete control over facet config expansion.
Generate hit meta
Creates the required hit metas in the search logics for each property set as retrievable.
Only clear this option to take complete control over meta expansion.
Generate prefix
Creates the required prefix handlers in the search logics for each property set as searchable with prefix.
Only clear this option to take complete control over query prefix handler expansion.
Analysis pipelines
Specifies the analysis pipelines (as a comma-separated list) for which mappings and documents processors are generated. If empty, they are generated for all pipelines.
Search logics
Specifies the search logics (as a comma-separated list) for which prefix handlers, facets, and hit metas are generated. If empty, they are generated for all search logics.
Customize a Specific Data Model Property
1. In the Administration Console, go to Index > Data Model.
2. Select the class for which you want to customize properties.
3. Click the property name to display its configuration details and expand the Expansion control section.
a. To make options available, select Customize default expansion.
Note: These options depend on the property configuration.
4. Click Apply.
Fully Override the Data Model Expansion for a Property
In some cases, you actually want to fully remove the generated elements. For example, you may want to remove a generated facet, because you want to store it but not display it at a given time.
1. In the Administration Console, go to Index > Data Model.
2. Select a property, then expand Expansion control.
3. Clear the appropriate Generate... option.
Customize a Specific Search Logic Element
1. In the Administration Console, go to Search > Search Logics tab that stores the element to customize.
2. Click an element name to display its configuration details.
◦ The options are unavailable.
◦ Generated by Data Model displays Yes.
3. To make these options available, click Customize.
◦ The configuration options can now be modified.
◦ To undo your changes, click Restore.
4. Click Apply.
Taking Control over Generated Index Fields
Sometimes, you may want to take control over index fields generated from data model properties or add new fields to store specific elements of your corpus.
This can be done by editing or adding fields in the Data Model > Advanced Schema tab.
For example, you can add binary retrievable fields to store binary data in the index. This can be useful if you want a dedicated thumbnail or preview generation and make it available directly inside the document. This also allows you to optimize the index storage.
1. In the Administration Console, go to Data Model > Advanced schema.
2. Click Add field.
a. For Name, enter a descriptive name, for example, thumbnails