Yes anything else is working fine, I was using multi match (cross fields) for text searches. However, for this particular task I need to search documents similar to a particular document. Don't know why this is not working. In version 1.4 I think it was working fine with the filtered api.
I got something similar to work with the keys in a bit a different order and also I think it is better to use ids instead of like (following docs I also thought that I needed like, but did not get it to work till I used ids). My working example in a python dict is the following, where I do a bool query with more_likeThis with own rescoring as one must clause an matching another field as another must clause: {'query': {'bool': {'must': [{'function_score': {'functions': [{'filter1':11,[..]},{'filter2':22,[..]}], 'query': {'more_like_this': { 'fields': ["myfields"] 'ids': 123,#instead of like 'max_query_terms': 52, 'min_term_freq': 2, 'minimum_should_match': '25%', 'stop_words':[..]}} 'score_mode': '..' }}, {'terms': {'myspecialField: ['matchThis']}}]}}}
Could it be due to the params you give to more like this? I found it very useful to check what this query actually does via using validate, see more like this exple here. For instance I could imagine that min_term_freq : 1, max_query_terms : 12
could imply that you have only VERY specific terms to the mother-document to be matched by other docs
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.