OpenSearch/docs/reference
Alex Ksikes 4da407a869 MLT Query: versatile 'like' parameter
The MLT query has a lot of parameters. For example, a set of documents is
specified with either `like_text`, `ids` or `docs`, with at least one
parameter required. This commit groups all the document specification
parameters under one called `like`. The syntax is described below and could
easily be extended to allow for new means of specifying document input. The
`like_text`, `ids` and `docs` parameters are deprecated.

As a single piece text:

{
  "query": {
    "more_like_this": {
      "like": "some text here"
    }
  }
}

As a single item:

{
  "query": {
    "more_like_this": {
      "like": {
        "_index": "imdb",
        "_type": "movies",
        "_id": "88247"
      }
    }
  }
}

Or as a mixture of all:

{
  "query": {
    "more_like_this": {
      "like": [
        "Some random text ...",
        {
          "_index": "imdb",
          "_type": "movies",
          "_id": "88247"
        },
        {
          "_index": "imdb",
          "_type": "movies",
          "doc": {
            "title": "Document with an artificial title!"
          }
        }
      ]
    }
  }
}

Closes #8039
2014-10-25 11:04:51 +02:00
..
analysis Docs: add the predefined language-specific stopword lists to stop-tokenfilter.asciidoc 2014-10-16 13:20:38 +09:00
cat Docs: Removing escape character 2014-10-15 21:42:22 +02:00
cluster Update update-settings.asciidoc 2014-10-22 12:46:33 +02:00
docs MLT Query: versatile 'like' parameter 2014-10-25 11:04:51 +02:00
images Docs: fix formula typo in documentation of the gauss decay in function_score 2014-09-01 09:46:13 +02:00
index-modules Docs: Fix curl statements in query-cache.asciidoc 2014-10-15 13:16:20 +02:00
indices [ROUTING] Add rebalance enabled allocation decider 2014-10-23 14:07:13 +02:00
mapping Mappings: Store _timestamp by default. 2014-10-20 12:17:26 +02:00
migration Search: Remove partial fields. 2014-10-20 12:29:30 +02:00
modules [ROUTING] Add rebalance enabled allocation decider 2014-10-23 14:07:13 +02:00
query-dsl MLT Query: versatile 'like' parameter 2014-10-25 11:04:51 +02:00
search Docs: missing quote 2014-10-21 12:52:12 +02:00
setup Docs: rolling upgrade process seems incorrect 2014-10-24 16:45:42 +02:00
testing Docs: Removed all the added/deprecated tags from 1.x 2014-09-26 21:04:42 +02:00
analysis.asciidoc Add more anchor links to documentation 2013-09-30 13:13:16 -06:00
api-conventions.asciidoc Docs: Removed all the added/deprecated tags from 1.x 2014-09-26 21:04:42 +02:00
cat.asciidoc [DOCS] reordered cat apis menu 2014-06-03 11:06:35 +02:00
cluster.asciidoc [DOCS] Fix HTTP endpoints after stats API changes 2014-01-09 11:30:28 +01:00
docs.asciidoc Bulk UDP: Removal. 2014-09-11 09:52:09 +02:00
getting-started.asciidoc Docs: fixed typo in documentation 2014-10-24 15:27:31 +02:00
glossary.asciidoc Migrated documentation into the main repo 2013-08-29 01:24:34 +02:00
index-modules.asciidoc [DOCS] Remove the section about codecs. 2014-08-07 11:24:44 +02:00
index.asciidoc Core: Added the `index.query.parse.allow_unmapped_fields` setting to fail queries if they refer to unmapped fields. 2014-09-09 15:00:47 +02:00
indices.asciidoc Add forgotten include for upgrade docs. 2014-10-10 10:55:45 -07:00
mapping.asciidoc Facets: Removal from master. 2014-08-21 10:34:39 +02:00
modules.asciidoc [DOCS] Fixed link to tribe.asciidoc 2014-01-13 22:01:12 +01:00
query-dsl.asciidoc Facets: Removal from master. 2014-08-21 10:34:39 +02:00
search.asciidoc Search Exists API: Checks if any matching documents exist for a given query 2014-07-31 15:42:30 -04:00
setup.asciidoc Docs: Removed all the added/deprecated tags from 1.x 2014-09-26 21:04:42 +02:00
testing.asciidoc [DOCS] Test framework documentation 2013-12-02 18:01:45 +01:00