Index build yfs.properties

Review the yfs properties used in the index build process and learn how to configure them.

The following table describes the index build yfs.properties:

Property Values Description
Search index properties
yfs.ssi.enabled Valid values = Y, N

Default value = N

Set this property to Y to enable the Sterling Search Index feature. This will index all entities that are enabled for indexing, for example, Order.

For example, yfs.ssi.enabled=Y

yfs.ssi.search.engine.name Valid values = elasticsearch, <custom value>

Default value = elasticsearch

Determines the name of the search engine used for indexing.

For example:

yfs.ssi.search.engine.name=elasticsearch

Based on the name provided in this property, other properties will be looked up. For example, if the class name property is yfs.ssi.search.engine.name=xyz, provide yfs.ssi.search.engine.xyz.class=<fully-qualified class>.

yfs.ssi.search.engine.<custom value>.class Valid value = <fully-qualified class name> If using a custom implementation (that is, if property yfs.ssi.search.engine.name=<custom value>), provide a fully-qualified class name.

This property defines the class name that enables the custom implementation of the search engine client, where <custom value> is the value defined in the property yfs.ssi.search.engine.name. For example, if yfs.ssi.search.engine.name is defined as xyz, then yfs.ssi.search.engine.xyz.class=<fully-qualified class name>.

yfs.ssi.batch.index.periodicity.secs Valid value = <number of seconds>

Default value = 3

Determines the periodicity with which the search index will be updated through a batch operation. The value provided is the time in seconds after which another batch operation will be submitted to the search engine.

For example:

yfs.ssi.batch.index.periodicity.secs=3

Fail-fast determination logic properties
yfs.ssi.fail.fast Valid values = true, false

Default = true

When set to true, this property enables the fail-fast logic. The fail-fast logic ensures that upon continuous failure, indexing into the search engine is temporarily stopped until the problem is resolved. The definition of what constitutes a continuous failure can be configured using the properties that follow.

Continuous failures for indexing operations are tracked. In case of continuous failure in an indexing operation, the corresponding operation is not attempted again until the problem is fixed and the operation is re-enabled through an API.

Note: If the indexing operation continuously fails, the search working flag is automatically turned-off to indicate that index is probably dirty and searching on index is unreliable.

The successes and failures of indexing operations are sampled on each application server/agent server JVM that performs the operation. The sampled success or failure events are used to determine if there has been a continuous failure. The indexing operation is considered to continuously fail under either of the following conditions:

  1. If at least 50 (configurable) index operations were performed in a given JVM in the last 10 minutes (configurable), and if there are at least 90% (configurable) of failures in that sample.
  2. If less than 50 index operations were performed in a given JVM in the last 10 minutes, and among the last 50 samples, there is a 90% failure (irrespective of how long it took for 50 index operations to occur).

For example, if there is a load of 30 index operations per minute overall, and there are five application servers in the cluster to handle that load, each application server would be handling 60 such operations in 10 minutes. In such a case, condition 1 above will apply, and continuous failure is determined based on 90% failure in this sample of 60 operations, that is, 54 failures out of 60. If, on the other hand, there were 10 application servers handling the same load, there would have been only 30 such operations in 10 minutes.

When a continuous failure is determined by any one JVM (application servers or agent/integration servers), the same is communicated to all the others and the index operations are stopped on all the JVMs. You are notified of the same, enabling you to take corrective measure and re-enable index operations.

You can configure the three configurable settings by using the following properties:

  • yfs.ssi.fail.fast.index.monitor.time.mins
  • yfs.ssi.fail.fast.index.min.sample.count
  • yfs.ssi.fail.fast.index.threshold.percent
yfs.ssi.fail.fast.index.monitor.time.mins

Valid values = <number of minutes>

Default = 10

Determines the minimum duration of time (in minutes) the index operation should fail to be treated as a continuous failure. In the example provided for the yfs.ssi.fail.fast property, this is 10.

For example:

yfs.ssi.fail.fast.index.monitor.time.mins=10

yfs.ssi.fail.fast.index.min.sample.count

Valid values = <number of sample counts>

Default = 50

Determines the minimum sample count to be used to determine a continuous failure situation. In the example provided for the yfs.ssi.fail.fast property, this is 50.

For example:

yfs.ssi.fail.fast.index.min.sample.count=50

yfs.ssi.fail.fast.index.threshold.percent

Valid values = <percentage>

Default =90

Determines the failure threshold that, if crossed, indicates continuous failure. In the example provided for the yfs.ssi.fail.fast property, this is 90%.

For example:

yfs.ssi.fail.fast.index.threshold.percent=90

Overrides for specific indexes:

yfs.ssi.fail.fast.index.monitor.time.mins.<index name>

yfs.ssi.fail.fast.index.sample.count.<index name>

yfs.ssi.fail.fast.index.threshold.percent.<index name>

  Set these properties to override for a particular index.

<index name> is the name of the index, such as Order. For example, to override the yfs.ssi.fail.fast.index.monitor.time.mins property for the index Order, the property can be set as yfs.ssi.fail.fast.index.monitor.time.mins.Order=10.