Fuzzy Like This (FLT) - ElasticSearch

I am trying to implement FLT in the prototype ES system that I am creating. I looked at the documentation on the Elasticsearch website and although I am there, I cannot get this to work. Maybe someone out there can give me some information on how to do this.

I can't seem to find examples of how this is done elsewhere on the Internet, but perhaps my Google skills cannot be scratched today. This is what I managed to build so far -

$ curl -XGET 'http://127.0.0.1:9200/uber/uber/_search?' -d '{ "fuzzy_like_this": { "fields": [ "pty_firstname", "pty_surname" ], "like_text": "Nathan Andew", "max_query_terms": 12 } }' 

Here is the error message I receive from my invitation when sending a request -

 { "error":"SearchPhaseExecutionException[Failed to execute phase [query], total failure; shardFailures {[u9HfJxbXRn-8ml19FKBTiA][uber][2]: SearchParseException[[uber][2]: from[-1],size[-1]: Parse Failure [Failed to parse source [ { "fuzzy_like_this": { "fields": [ "pty_firstname", "pty_surname" ], "like_text": "Nathan Andew", "max_query_terms": 12 } } ]]]; nested: SearchParseException[[uber][2]: from[-1],size[-1]: Parse Failure [No parser for element [fuzzy_like_this]]]; }{[u9HfJxbXRn-8ml19FKBTiA][uber][0]: SearchParseException[[uber][0]: from[-1],size[-1]: Parse Failure [Failed to parse source [ { "fuzzy_like_this": { "fields": [ "pty_firstname", "pty_surname" ], "like_text": "Nathan Andew", "max_query_terms": 12 } } ]]]; nested: SearchParseException[[uber][0]: from[-1],size[-1]: Parse Failure [No parser for element [fuzzy_like_this]]]; }]", "status":500 } 
+7
search curl elasticsearch lucene fuzzy-search
source share
1 answer

I think you are missing a request , you need to do something like:

 $ curl -XPOST 'http://127.0.0.1:9200/uber/uber/_search?' -d ' { "query" : { "fuzzy_like_this" : { "fields" : ["pty_firstname", "pty_surname"], "like_text" : "Nathan Andew", "max_query_terms" : 12 } } }' 
+15
source share

All Articles