7.3.1Full-Text Indexing

 

Smile CDR uses a Full-Text engine to provide fast indexing capabilities for specific query patterns that benefit from this type of index. Using this feature is completely optional, and Smile CDR will function without it. There are several query patterns that will not function without it, although these are all considered advanced types of searches that are not expected to be needed in a "typical" deployment.

7.3.2Indexes

 

When Hibernate Search Indexing is enabled, each of the following indexing functions can also be used if the corresponding setting is also enabled.

Note that enabling any of these options on a populated index requires reindexing existing resources
  • Terminology Index – When CodeSystem resources are stored in the repository, an additional set of terminology capabilities are enabled. See Terminology and Full-Text Indexing for more information. This specific capability can not currently be disabled if Full-Text Indexing is enabled.

  • FullText Content Index – The FullText Content index indexes all string element values within every resource stored to the repository, as well as the contents of every resource narrative. This enables support for the _text and _content special Search Parameters. Because this index stores a separately indexed copy of most/all of the content within many resources, it can potentially consume a large amount of space so careful capacity planning should be used if this feature is enabled on a repository that contains a large number of resources. This setting should be disabled if it is not needed.

  • Search Parameter Index – The Search Parameter index extends token indexing with support for the :text modifier, as well as indexing string parameters with support for the :exact, :contains, and :text search modifiers. This will increase space and memory requirements.

  • Store Resources – The Store Resources indexes all resource data values within every resource stored to the repository. This can be useful in allowing fulltext searches, but it can potentially consume a large amount of space so careful capacity planning should be used if this feature is enabled on a repository that contains a large number of resources.

7.3.3Full-Text Providers

 

Smile CDR ships with compatibility to 3 providers that can be used to provide indexing services. Each one has its own characteristics:

  • ELASTICSEARCH – This provider uses an ElasticSearch / OpenSearch cluster to provide indexing. This is the recommended option if you want to support Full-Text indexing. Note that to use this option, you will need to create and manage your own Elasticsearch/OpenSearch cluster.

  • LUCENE_DISKApache Lucene can be used as a more lightweight option for system that do not require the robustness and scalability of ElasticSearch. Note that this option is lightweight and easier to set up than ElasticSearch but it will not function correctly in a cluster and can cause maintenance troubles over the long term. Lucene updates can sometimes leave the Lucene indexes in an unusable state, requiring a complete resource reindex in order to rebuild them.

  • LUCENE_MEMORY – This option uses a purely in-memory Apache Lucene store, which does not preserve data across system restarts. This is intended only for testing scenarios.

7.3.4Lucene Disk Provider

 

When using the Lucene Disk Provider, a directory on the local filesystem should be configured using the Hibernate Search Directory option.

This directory should be created on a disk partition that has enough capacity to store all content for the selected indexes.

7.3.5Elasticsearch/OpenSearch Provider

 

When using the Elasticsearch/OpenSearch provider, the following settings should be provided:

  • URL – The Elasticsearch/OpenSearch Cluster endpoint URL stripped of protocol

  • Protocol – The Elasticsearch/OpenSearch protocol (http/https)

  • Username – The Elasticsearch/OpenSearch connection username.

  • Password – The Elasticsearch/OpenSearch connection password.

In order for Smile CDR to connect to the Elasticsearch/OpenSearch cluster, The connecting user has to have the following minimal set of permissions.

For each of the following index permissions which are prefixed with indices:, the user must have them associated to these two index patterns:

  • resourcetable-*
  • termconcept-*

7.3.5.1OpenSearch Permissions

PermissionReason
indices:admin/getListing existing indices
indices:admin/aliasesAbility to create write and read aliases for necessary indices
indices:admin/createAbility to create required indices
indices:admin/mapping/putCustom index settings for Hibernate Search managed indices.
indices:data/write/bulk*Hibernate Search will often buffer and bulk-write in high throughput situations
indices:data/write/deleteData removal or reindexing needs to be updated to the fulltext index
indices:data/write/indexStoring data to Elasticsearch/OpenSearch
indices:data/read/searchTerminology/Fulltext search
cluster:monitor/mainHibernate Search monitoring indices for ILM rollover
cluster:monitor/healthHibernate Search health checks for the cluster

7.3.5.2Elasticsearch Permissions

PermissionReason
indices:manageCreation of indices and mapping management, as well as ILM
indices:readAbility to read and search indices.
indices:writeAbility to write to required indices
cluster:monitorHibernate Search health checks for the cluster