s = Search().query("query_string", query=search_text, fields=['Tittle', 'Description'], default_operator="AND")
I want to add fuzzy to this query
You can use MultiMatch to match multiple fields with the fuzziness parameter like so:
query = MultiMatch(query=search_text, fields=('Title', 'Description'), fuzziness='AUTO')
s = Search().query(query)
Thanks for answering @brainix
Is there anyway to get the word that is being used by elasticearch for searching.
Like elasticsearch will replace "blach jeans" to "black jeans".
So how can I get the phrase/word "black jeans"?
You can use highlighting to see snippets of the fields that matched like so:
query = MultiMatch(query=search_text, fields=('Title', 'Description'), fuzziness='AUTO')
s = Search().query(query).highlight('Title', 'Description', type='plain')
Most helpful comment
Thanks for answering @brainix