From fbd43196a897601b6dd815e16b9d8b0589447c60 Mon Sep 17 00:00:00 2001 From: markharwood Date: Fri, 18 Oct 2019 15:02:19 +0100 Subject: [PATCH] [DOCS] Add TermVectors API reference to MLT query docs (#37228) Adds a reference the use of the TermVectors API following an issue raised about lack of flexibility in the MLT query: https://github.com/elastic/elasticsearch/issues/35509 --- docs/reference/query-dsl/mlt-query.asciidoc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/reference/query-dsl/mlt-query.asciidoc b/docs/reference/query-dsl/mlt-query.asciidoc index d8a2063bdf2..659d0542adb 100644 --- a/docs/reference/query-dsl/mlt-query.asciidoc +++ b/docs/reference/query-dsl/mlt-query.asciidoc @@ -246,3 +246,6 @@ results returned. Defaults to `false`. `boost`:: Sets the boost value of the whole query. Defaults to `1.0`. + +==== Alternative +To take more control over the construction of a query for similar documents it is worth considering writing custom client code to assemble selected terms from an example document into a Boolean query with the desired settings. The logic in `more_like_this` that selects "interesting" words from a piece of text is also accessible via the <>. For example, using the termvectors API it would be possible to present users with a selection of topical keywords found in a document's text, allowing them to select words of interest to drill down on, rather than using the more "black-box" approach of matching used by `more_like_this`.