Matching author and title with elasticsearch -
i'm trying match books based on author , title. unfortunately titles , authors used input differ in elasticsearch, words in different orders , have other differences can't exact matching. book records have field author , title. i've come following query:
{ "query":{ "bool":{ "must":{ "query_string":{ "query":"not israel parents promised me" }, "fuzzy":{ "author":{ "value":"peka, harvey", "boost":2 } } } } }, "from":1, "size":1 }
it's giving same result every time no matter input seems there's problem it. going wrong way?
i indexed books , authors , tried out. worked me different combinatios, like, jumbled words , incomplete names , when words incorrect, shown below:
{ "query": { "bool": { "must": [ { "query_string": { "default_field": "book", "query": "the girl angel tattoo" } }, { "query_string": { "default_field": "author", "query": "steig larsson" } } ] } } }
Comments
Post a Comment