Custom Rescoring in Elicsearch

I just want to get the results of my more_like_this_field query myself.
Why is this not working?

{ 
      "query": { 
            "function_score": { 
                    "more_like_this_field": { 
                            "test_field": { 
                                    "like_text": "this is a test", 
                                    "min_term_freq" : "0", 
                                    "min_doc_freq": "0" 
                            } 
                    }, 
                    "functions": [ 
                            { 
                                    "script_score": { 
                                            "script": "_score * 2" // just an example
                                    } 
                            } 
                    ] 
             } 
      } 
}

In addition, I like to calculate the score with the Levenshtein distance. I know that there is a fuzzy search with levenshtein, but it is limited and also slows down.
I just want to score the best results. Is it possible?

+3
source share

All Articles