Precision tuning (beta)edit

This functionality is in beta. Beta features are subject to change and are not covered by the support SLA of general release (GA) features. Elastic plans to promote this feature to GA in a future release.

App Search defaults to high recall results: we cast a wide net on your searches. You can use precision tuning to search with a different level of precision and recall—​tightening or loosening the term and phrase requirements needed for a document to be considered a match to a given query. Generally, more precision leads to less recall: getting more specific results usually comes at the cost of a lower tolerance of errors or variations in queries.

Precision tuning is currently an API feature. To tune precision, set a precision tuning value, either per engine or per query.

Tune precision per engineedit

Use the search settings API to set the default precision value for an engine. The value will therefore apply to all queries sent to that engine that don’t provide their own precision value.

Tune precision per queryedit

Use the precision parameter of the search API to set the value for a particular query. When set per query, the precision value overrides the default value set for the engine.

Precision tuning valuesedit

Precision tuning values are integers that range from 1 to 11. The range of values represents a sliding scale that manages the inherent tradeoff between precision and recall. Lower values favor recall, while higher values favor precision.

The precision tuning value for a query changes which documents match that query. App Search matches documents to a query at the term and phrase levels.

  • Term matching refers to how App Search handles individual terms within queries and documents. Terms are usually words, but can be any arbitrary group of letters or numbers. App Search uses Elasticsearch analyzers to process text into terms.
  • Phrase Matching applies when a query contains multiple terms. When determining which documents match a query, App Search may consider the number of query terms that appear in the document, the ordering of the terms, or where in the document the terms appear (for example, within the same field).

The following table describes each precision tuning value, including the affect on term matching and phrase matching. Experiment with different values to find the value that works best with each engine’s documents.

Value Description Term matching Phrase matching


Lowest precision and highest recall setting.

A complete set of analyzers for term matching: stemming, delimiter, joined, prefix, and fuzzy matching.

At least one term in any field must match.


Default. High recall, low precision.

(Same as above)

Less than half of the terms must match.


Increasing phrase matching: half the terms.

(Same as above)

Queries with two or fewer terms require all terms to match. With more terms, half the terms must match (rounded up).


Increasing phrase matching: three-quarters of the terms.

(Same as above)

Queries with three or fewer terms require all terms to match, then three-quarters of terms must match (rounded down).


Increasing phrase matching requirements: all but one of the terms.

(Same as above)

Queries with four or fewer terms require all terms to match, then all but one terms must match.


All terms must match.

(Same as above)

Every term must appear in the document, in any field.


The strictest phrase matching requirement: all terms must match, and in the same field.

(Same as above)

Every term must appear in the document.


Decreasing typo tolerance: advanced typo tolerance is disabled.

Fuzzy matching is turned off, but the term pre-treatments remain.

Every term must appear in the same field in the document.


Decreasing term matching: prefixing is disabled.

Fuzzy matching and prefixing are turned off, but the remaining basic pre-treatments remain.

Every term must appear in the same field.


Decreasing typo-tolerance: no compound-word correction.

Fuzzy matching, prefixing, and delimiting / joining are turned off – contractions or hyphenations will now no longer match (e.g. "e-commerce" and "ecommerce")

Every term must appear in the same field.


Exact spelling matches only.

Besides lowercasing, the terms must match with the exact spelling.

Every term must appear in the same field.