Query check properties file

A query check properties file is used to define a list of Solr queries to validate the data integrity of the search index at different stages of the index lifecycle. A single properties file can include a list of queries for different cores. When the index check validation runs, it runs only the core-specific queries, ignoring all other cores. This behavior ensures that you need to maintain only one file for all cores. The same file can be included in either every core's conf directory, or can be saved to a common location to all cores. Depending on the query parameters, you might need at least one file per master catalog.

The query check properties file contains two types of properties: Query properties, and master server properties. Master server properties are only needed on the master server when using the indexprop utility and specifying the optional queryCheckPropFile parameter.

Query properties

Query properties require a specific format. They are prefixed with the query keyword, followed by a query unique identifier, followed by the query property name, all separated by a dot separator.

For example: query.queryIdentifier.propertyName=propertyValue

Where:
query
The unique keyword that must be used as a prefix for all query properties.
queryIdentifier
A unique identifier that groups different query properties into one logical query.
propertyName
The actual query property name. For example, indexType, indexSubType, minResultCount, q, and fq.
propertyValue
The property value. Depending on the property name, different values are expected.
The following property names and values are expected:
indexType
A mandatory query property that represents the index type that the query is meant for. Possible values are CatalogEntry, CatalogGroup.
indexSubType
A mandatory query property that represents the index subtype that the query is meant for. Possible values are Structured, Unstructured, Inventory.
Note: The indexType and indexSubType are used together to identify core-specific queries. For example, when a CatalogEntry index type and Structured index subtype are set, the query is applicable to the CatalogEntry index in all locales. Or, when a CatalogEntry index type and Unstructured index subtype are set, the query is applicable to the unstructured CatalogEntry index in all locales.
minResultCount
Optional: A numeric value that represents the minimum result count that should be used to compare with the actual result count that query returns. If the result generated by the query is less than this number, the query check reports a failure.
The default value is 0.
q
Optional A Solr query format that represents the term being searched for. For example, q=dress, q=name:dress, or q=catentry_id:10001.
The default value is q=*:*.
fq
Optional: A Solr filter query format that represents the additional filters that a query has. For example, fq=published:1, or fq=catalog_id:10001 AND storeent_id:(10051 10152).
Note: Every logical query must contain at most one entry per property name. That is, you cannot have multiple entries of the same property for the same logical query.

Master server properties

Master server properties require a specific format. They are prefixed with the Master keyword, followed by the master server property name, which is separated by a dot separator.

For example: Master.propertyName=propertyValue

Where:
Master
The unique keyword that must be used as a prefix for all master properties.
propertyName
The actual master server property name. For example, index-server-name, index-server-port, and index-server-user.
Note: The master.index-server-password property can be defined only in a password file that is provided when running the indexprop utility.
propertyValue
The property value. Depending on the property name, different values are expected.
The following property names and values are expected:
index-server-name
A mandatory master property that represents the master server name.
index-server-port
A mandatory master property that represents the master server's port number.
index-server-user
Optional: A master property that represents the master server user name, when application security is enabled.
Note: Master server properties are only needed on the master server when using the indexprop utility and specifying the optional queryCheckPropFile parameter.

Sample properties file

You can use the following sample properties file for reference: queryCheck.zip.

The sample contains a master server configuration and six queries that target various index types and subtypes with Solr queries and filter queries.