Fabric enables adding templates for Search fields when the default settings do not match a search's needs. For example, to search by fields that contain special characters like an email address.
Go to the project tree, right click the project name > Open Folder.
Open the [project name].k2proj file to be edited.
Edit the Search options under the DataChangeIndicators tag and add the template names to the Options tag. The following example displays adding a precision-match-20 template:
<DataChangeIndicators>
<DataChange name="Search" enabled="true">
<Options>
<option>keyword</option>
<option>data</option>
<option>date</option>
<option>precision-match-20</option>
</Options>
Save and close the .k2proj file.
Close and reopen the project to reload the updated .k2proj file.
When creating a new Search index, you can also select the added template as a Type.
It is recommended to limit the number of Search fields based on N-gram tokenizer like predictive-search and precision-match-20 templates due to the extremely large disk space required to store these fields. For example:
The predictive-search template is based on the Edge-n-gram tokenizer. The following tokens are created for 'Tali'-
The precision-match-20 template is based on the N-gram tokenizer. The following tokens are created for 'John Doe'-
Fabric only supports using templates on Search fields when the template is set as a type during the first deployment of the corresponding LU table. This is because Fabric creates an index in Elasticsearch for each LU Table that has Search fields. Using a template on a Search field requires different index settings in Elasticsearch.
Since the index settings cannot be changed once created in Elasticsearch, to update a Search field from a supported Elasticsearch type to a template, do the following:
Create an index with the update settings in Elasticsearch.
Re-index the data from the old Elasticsearch index to the new index.
Drop the old Elasticsearch index.
Add an alias with the same settings as the previous index to the new Elasticsearch index.
Click for more information about creating Elasticsearch indexes.
Fabric enables adding templates for Search fields when the default settings do not match a search's needs. For example, to search by fields that contain special characters like an email address.
Go to the project tree, right click the project name > Open Folder.
Open the [project name].k2proj file to be edited.
Edit the Search options under the DataChangeIndicators tag and add the template names to the Options tag. The following example displays adding a precision-match-20 template:
<DataChangeIndicators>
<DataChange name="Search" enabled="true">
<Options>
<option>keyword</option>
<option>data</option>
<option>date</option>
<option>precision-match-20</option>
</Options>
Save and close the .k2proj file.
Close and reopen the project to reload the updated .k2proj file.
When creating a new Search index, you can also select the added template as a Type.
It is recommended to limit the number of Search fields based on N-gram tokenizer like predictive-search and precision-match-20 templates due to the extremely large disk space required to store these fields. For example:
The predictive-search template is based on the Edge-n-gram tokenizer. The following tokens are created for 'Tali'-
The precision-match-20 template is based on the N-gram tokenizer. The following tokens are created for 'John Doe'-
Fabric only supports using templates on Search fields when the template is set as a type during the first deployment of the corresponding LU table. This is because Fabric creates an index in Elasticsearch for each LU Table that has Search fields. Using a template on a Search field requires different index settings in Elasticsearch.
Since the index settings cannot be changed once created in Elasticsearch, to update a Search field from a supported Elasticsearch type to a template, do the following:
Create an index with the update settings in Elasticsearch.
Re-index the data from the old Elasticsearch index to the new index.
Drop the old Elasticsearch index.
Add an alias with the same settings as the previous index to the new Elasticsearch index.
Click for more information about creating Elasticsearch indexes.