Hi, following the more like this api document, I cannot get any returns even when I pass an exact term for search. Below is my code.
PUT /test
{
"mappings": {
"properties": {
"title": {
"type": "text",
"term_vector": "yes"
},
"description": {
"type": "text"
},
"tags": {
"type": "text",
"fields" : {
"raw": {
"type" : "text",
"analyzer": "keyword",
"term_vector" : "yes"
}
}
}
}
}
}
POST /test/_doc
{
"title":"test title",
"description":"test description",
"tag":"test tag"
}
GET /test/_search
{
"query": {
"more_like_this" : {
"fields" : ["title", "description"],
"like" : "test",
"min_term_freq" : 1,
"max_query_terms" : 12
}
}
}
GET /test/_search
{
"query": {
"more_like_this" : {
"fields" : ["title", "description"],
"like" : "test title",
"min_term_freq" : 1,
"max_query_terms" : 12
}
}
}