App Config

The Searching and Indexing web applications can be configured via a wide range of properties. These can either be set using System Properties:

Or by using a yaml configuration file:

related-item: 65536
  additional.prop.key.length: 20
  additional.prop.value.length: 20 10
    size.of.incoming.request.queue:  32

The following will list all the properties that are available for configuration, along with their use. Some properties are specifically for searching, others specifically for indexing, and others for both. This will be noted.


PropertyUse to logs (when DEBUG) the index request data max number of properties a related item can have. More properties than this will be silently discarded. There is no guarantee of ordering
related-item.max.number.related.items.per.index.request=10The max number of related items in a single index POST request size in bytes of the POST data for an index request minimum size, in bytes, of the POSTed json data for an index request
related-item.indexing.size.of.incoming.request.queue=16384Size of the ring buffer that accepts incoming indexing POST requests
related-item.indexing.size.of.batch.indexing.request.queue=-1The size of the ring buffer for each indexing processor that batch posts indexing requests to elasticsearch
related-item.indexing.batch.size=625The max number of related item objects (a single index request will have many related item objects), that can be sent for batching indexing to elastic search.
related-item.indexing.number.of.indexing.request.processors=2number of processors used to perform indexing (sending batch indexing requests) to elasticsearch
related-item.indexing.replace.old.indexed.content=falsereplace existing content (false) a separate thread for performing indexing discard related items in the indexing request it there are too many. Indexes up to the max, discards the others


PropertyUse of the ring buffer that accepts incoming search requests of the ring buffer for each search processor that submits search requests to elasticsearch of the ring buffer that is used to store incoming Request AsyncContext objects for later retrieval of additional properties that will be searched on number of search request that we expect to be similar key used for the id field in the search result json
related-item.searching.key.for.frequency.result.occurrence=frequencyThe key used for the frequency in the search results json used to represent how long the elasticsearch request took, in the json response doc used to represent how long the complete search request took. It is the key used in the response json in the search response used to represent the number of frequencies returned
related-item.searching.key.for.frequency.results=resultsKey in the search response json under which the frequencies are found
related-item.searching.request.parameter.for.size=maxresultsRequest parameter used to specify the max number of frequencies to return used to associate the id in a map of request parameters
related-item.searching.default.number.of.results=4Default number of search result (frequencies) to return
related-item.searching.size.of.response.processing.queue=-1Size of ring buffer for processing search results and sending json response to the awaiting AsyncContext
related-item.searching.number.of.searching.request.processors=2The number of ring buffers (processors) that will be sending search requests to elasticsearch property used for naming the facet during the search request to elastic search during search request to elastic search. The setting of ‘map’ is the default. Makes request much much faster in millis for elasticsearch requests http status code when a timeout occurs http status code when a search request fails to talk to elasticsearch http status code when no search result is found http status code when a match is found http status code when we cannot handle the json search response the search processors use a shared connection to elastic search
related-item.searching.response.debug.output.enabled=falseOutput the response json being sent to the client, also to a log file.


PropertyUse max number of characters that the “id” of a related items can have
related-item.additional.prop.key.length=30The max number of characters a property name can have
related-item.additional.prop.value.length=30The max number of characters a property value can have name of the index used in elasticsearch for storing related item documents (i.e. relateditems-YYYY-MM-DD) (no alias)The name of the index alias against which to search ( index type name of the elasticsearch cluster
related-item.indexing.key.for.index.request.related.with.attr=itemsThe key used in the indexed document for the storing the related ids key used in the indexed document for the date attribute key against which the id is stored in the indexed document
related-item.indexing.key.for.index.request.item.array.attr=itemsThe key in the incoming user json indexing request that contains the list of items of the elastic search file containing the transport client settings (defaults) of the elasticsearch file containing the node client settings (defaults) of the elasticsearch file than can be distributed to override the default node/transport settings used to convert date to a string used for creating the index name in which documents are stored
related-item.wait.strategy=yieldThe type of ring buffer wait strategy: yield/busy/sleep/block type of elasticsearch client to use of index date of index names to cache host:port,host:port contain the unicast addresses of the search nodes in elastic search to talk to default port if not specified to talk to in elasticsearch

By default the Searching and Indexing web applications will look for a yaml configuration file from which to load the configuration details. Any settings in the configuration file, override the defaults. Any system properties set will override the settings that are contained within the yaml configuration.

By default the yaml file related-items.yaml is looked for on the class path. The location of the file can be specified by the property, related-items.settings.file, for example:

  • -Drelated-items.settings.file=/etc/relateditems.yml

The yaml file, may look like the following:

              number.of.searching.request.processors: 16

              size.of.batch.indexing.request.queue: 4096

With the above in place the following properties are overridden:


If a system properties was set -Drelated-item.searching.number.of.searching.request.processors=2, that would override the setting in the yaml file.