django haystack - Elasticsearch - how to fuzzy match phrase when search keyword has no spaces? -


i want match document field title has value brown fox searching keyword brownfox.

when trying fuzzy query no results:

curl -xget 'http://localhost:9200/haystack/_search?pretty' -d '{     "query" : {         "fuzzy" : {             "title": {                 "value": "brownfox",                 "fuzziness": 2,                 "prefix_length": 0,                 "max_expansions": 10000             }         }     } }' 

i tried match query fuzziness , operator and:

curl -xget 'http://localhost:9200/haystack/_search?pretty' -d '{     "query": {       "match": {         "title": {           "query":     "brownfox",           "fuzziness": "auto",           "operator":  "and"         }       }     } }' 

this returns results similar keywords, not document title brown fox consider better match.

i read answer this question, don't have option update analyzer of field synonyms, since want match other similar cases too, including both missing spaces , mis-spelled words.

thanks!

the mapping of title field should, @ least, have analyzer keep "brown fox" single term. if it's using standard analyzer or not keeping brown fox whole you'll not able match that.


Comments

Popular posts from this blog

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

angular2 services - Angular 2 RC 4 Http post not firing -