More Like This Query Returning 0 Similar Documents

I have more than 500 documents. While executing more_like_this query
elasticsearch returning zero results.
Below is my query.

POST /espoc/_search
{
"from": 0,
"size": 2,
"query": {
"filtered": {
"query": {
"more_like_this": {
"fields": [
"subject",
"body",
"contentbase64"
],
"docs": [
{
"_index": "espoc",
"_type": "mail",
"_id": "07e028bf-02c7-48d8-980f-f870dee70c4f"
}
]
}
},
"filter": {
"or": [
{
"term": {
"userId": "8a40b965-c061-4fa9-aba0-4228c3b12f28"
}
}
]
}
}
},
"fields": "isWorkspace"
}

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/ed862018-e281-4894-839a-b781f582a7d3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Issue is solved by adding *_routing *value in every *docs *object. If we
using routing while indexing documents we have to use the *_routing *value
in every *docs *object instead of specifying it in url [POST /espoc/_search?
*_routing=*****].

On Monday, 1 December 2014 12:59:20 UTC+5:30, sekharreddy mandapati wrote:

I have more than 500 documents. While executing more_like_this query
elasticsearch returning zero results.
Below is my query.

POST /espoc/_search
{
"from": 0,
"size": 2,
"query": {
"filtered": {
"query": {
"more_like_this": {
"fields": [
"subject",
"body",
"contentbase64"
],
"docs": [
{
"_index": "espoc",
"_type": "mail",
"_id": "07e028bf-02c7-48d8-980f-f870dee70c4f"
}
]
}
},
"filter": {
"or": [
{
"term": {
"userId": "8a40b965-c061-4fa9-aba0-4228c3b12f28"
}
}
]
}
}
},
"fields": "isWorkspace"
}

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/ce094dfd-e408-42ef-bf05-3eb07eae87fb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.