On this page:

5.5Lucene Indexing

 

Smile CDR uses Apache Lucene 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.

However, its use can significantly improve performance and enable additional functionality on terminology operations, so it is recommended for use in environments where validation or other terminology operations will be heavily used.

Indexes

When Lucene Indexing is enabled, one or more of the following indexes should be enabled:

  • Terminology Index – The terminology index stores CodeSystem concept details, including codes, properties, and hierarchy in a specialized index that can be used for efficient code searches.

  • FullText Content Index – The FullText Content index indexes all string element 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 large a number of resources.

Lucene Providers

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

  • LUCENE_MEMORY – This provider keeps a copy of the index in memory. This provider is only recommended for testing and non-production scenarios. It is very fast, but will lose all stored data when the system shuts down.

  • LUCENE_DISK – This provider uses a local disk file to store indexing information. This option is a production-ready solution, but is only recommended for non-clustered environments.

  • ELASTICSEARCH – This provider uses an ElasticSearch cluster to provide indexing. This option is suitable for clustered environments.

5.5.1Lucene 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.

5.5.2ElasticSearch Provider

 

When using the ElasticSearch provider, the following settings should be provided:

  • URL – The ElasticSearch Cluster HTTP endpoint URL.

  • Username – The ElasticSearch connection username.

  • Password – The ElasticSearch connection password.