Trony Tr
Trony Tr

Reputation: 117

Elasticsearch: Replacement for Fuzzy Like This Query Deprecation

Reference to this link it said that the Fuzzy Like This (also Fuzzy Like This Query) will be deprecated in ES version > 1.6, and completely remove in version 2. I'm using Elasticsearch version 1.5.1 and using a lot of FLT statement in my search query. I would like to upgrade the ES version to the current latest (1.7), but I could not find any suggest about FLT replacement when move to newer version? So I would like to ask, if any. And is it possible to use it when it is deprecated?

Upvotes: 9

Views: 2427

Answers (2)

user3071643
user3071643

Reputation: 1533

I've run into the same problem. I borrowed a solution discussed on github https://github.com/elastic/elasticsearch/pull/10391

{ 
    "multi_match" : {  
        "fields" : ["_all"],
        "query" : "your search text",
        "fuzziness" : "AUTO"}
}

multi_match has a number of other parameters you can use to improve the result.

Upvotes: 3

Chief Wiggum
Chief Wiggum

Reputation: 2934

I found the following recommendation in the Elasticseach reference :

The fuzzy_like_this or flt query has been removed. Instead use the fuzziness parameter with the match query or the More Like This Query.

Deprecated means that you can still use this feature without issues as long as you don't upgrade to version 2 or higher. I'm using version 1.7.1 and flt works fine. But the feature will no longer exist in version 2.x. For more details why they decided to remove it you can have a look at the relevant github thread.

Upvotes: 8

Related Questions