I have an index = "es_demo" , where I need to find similar documents to given "_id", I don't think it is working as the returned results have same "_id" as mentioned in the query . And as written in the elastic documentation having "include" parameter as "false" will not be returning the "ids" mentioned in the query.
{
"query": {
"more_like_this": {
"fields": "_doc",
"like": {
"docs": [
{
"_id": "5fac83afdce931230ef44c0a"
},
{
"_id": "5f80096adce931230e8bdb2d"
}
]
}
}
},
"include": "false"
}
Can someone please help me out here I think the query I wrote is wrong.
I also tried these queries :
{
"query": {
"more_like_this": {
"fields": "_doc",
"like": [
{
"_id": "5fac83afdce931230ef44c0a"
},
{
"_id": "5f80096adce931230e8bdb2d"
}
]
}
}
}
{
"query": {
"more_like_this": {
"fields": "_doc",
"like": [
{
"_id": "5fac83afdce931230ef44c0a"
},
{
"_id": "5f80096adce931230e8bdb2d"
}
]
}
},
"include": "False"
}
The first result I got was the same document with "_id": "5fac83afdce931230ef44c0a" for every query
The query below works for my index movies.
Remember about parameter fields:
Query (edit for you case)