Hi,
I have a field of type long
and I want to search by more_like_this
query. this is my query:
{
"query": {
"more_like_this": {
"fields": [
"title",
"body",
"lc"
],
"like": [
{
"_index": "myIndex",
"_type": "myType",
"_id": "58abf6ab9c5600459a80d84e"
}
],
"min_term_freq": 1,
"max_query_terms": 50
}
}
}
and the response:
{
"error": {
"root_cause": [
{
"type": "query_shard_exception",
"reason": "failed to create query: {\n \"more_like_this\" : {\n \"fields\" : [\n \"title\",\n \"body\",\n \"jobTag\",\n \"jobType\",\n \"lc\"\n ],\n \"like\" : [\n {\n \"_index\" : \"myIndex\",\n \"_type\" : \"job\",\n \"_id\" : \"58abf6ab9c5600459a80d84e\"\n }\n ],\n \"max_query_terms\" : 50,\n \"min_term_freq\" : 1,\n \"min_doc_freq\" : 5,\n \"max_doc_freq\" : 2147483647,\n \"min_word_length\" : 0,\n \"max_word_length\" : 0,\n \"minimum_should_match\" : \"30%\",\n \"boost_terms\" : 0.0,\n \"include\" : false,\n \"fail_on_unsupported_field\" : true,\n \"boost\" : 1.0\n }\n}",
"index_uuid": "z4vclzeBRFubOPfs3xc4EQ",
"index": "myIndex"
}
],
elasticsearch version: 5.2