Precision tuning (beta)

edit

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.

Precision tuning has no effect in queries that contain synonyms.

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.

To tune precision, set precision tuning values in any of the following ways:

Tune precision per engine using the UI

edit

Tune precision within Kibana: Navigate to Enterprise SearchApp SearchEnginesengine nameRelevance tuning. Locate Precision tuning, and set the default precision value for the engine. The value will therefore apply to all queries sent to that engine that don’t provide their own precision value.

Tune precision per engine using the API

edit

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 query using the API

edit

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 values

edit

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

1

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.

2

Default. High recall, low precision.

(Same as above)

Less than half of the terms must match.

3

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).

4

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).

5

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.

6

All terms must match.

(Same as above)

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

7

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

(Same as above)

Every term must appear in the document.

8

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.

9

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.

10

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.

11

Exact spelling matches only.

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

Every tokenized term must appear in the same field. NOTE: This is not an exact match against the field value (e.g. a search for "PART-123" can return documents that contain both tokenized "PART" and "123" terms such as "PART-123-456"). To exactly match a field value, use Search API filters.