fuzzy query in elasticsearch -


i followed tutorial.
tried 3 data , worked when add 200 data tutorial "text , id" when did research doesn't work

for exemple have { "index": { "_id": 237 }} { "text": "emco"} when research as:

get /weef/dicomot/_search {"query": { "fuzzy": {      "text": "emco" }}} 

i got this:

{ "took": 36,"timed_out": false, "_shards": { "total": 5 "successful": 5, "failed": 0},    "hits": { "total": 0, "max_score": null, "hits": [] }} 

any suggestion?

you using standard analyzer "lowercase" token filter.

so "emco" indexed "emco".

there 2 solutions solve problem:

  1. use lowercase keyword search , search result:

    get /weef/dicomot/_search {"query": { "fuzzy": { "text": "emco" }}}

  2. update index analyzer without lowercase filter


Popular posts from this blog

php - How should I create my API for mobile applications (Needs Authentication) -

5 Reasons to Blog Anonymously (and 5 Reasons Not To)

Google AdWords and AdSense - A Dynamic Small Business Marketing Duo