Skip to content

More Like This Query documentation - remove reference to "ids" and "like_text" parameter  #28128

Closed
@markharwood

Description

@markharwood

A user on the discuss forums reported that MLT had deprecated ids and like_text params but not removed them from the docs following their removal from the codebase.
I tried these params in 6.0 and it does look like docs diverge from code at this point.

The API now only takes a single like parameter which either accepts a string (the equivalent behaviour of the old like_text) or an array of objects with index, type and id settings to identify individual docs (the equivalent of the old ids setting). Valid examples below:

GET kaleida/article/_search
{
  "query": {
	"more_like_this": {
	  "fields": [
		"headline"
	  ],
	  "like": [
		{
		  "_index": "kaleida",
		  "_type": "article",
		  "_id": "szeNvGABw9SxSpuUzKMH"
		}
	  ]
	}
  }
} 

GET kaleida/article/_search
{
  "query": {
	"more_like_this": {
	  "fields": [
		"headline"
	  ],
	  "like": "trump says trump is stable genius"
	}
  }
}

The docs however still talk about explicit ids and like_text params which are no longer supported.

Metadata

Metadata

Assignees

Labels

:Search/SearchSearch-related issues that do not fall into other categories>docsGeneral docs changesv6.0.0

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions