Elastic Search Query Find Exact Match Of Values In The List From Regexp Input Parameter
My data looks like below: { 'name': 'name1', 'name_gr': ['gr1','gr2'] }, { 'name': 'name2', 'name_gr': ['gr1','gr2'] }, { 'name': 'name3', 'name_g
Solution 1:
You are using a match
query in your example where you want to be using regexp
instead. To do this just use:
s = Search().query('regexp', name_gr='gr[12]')
s.execute()
Hope this helps!
Post a Comment for "Elastic Search Query Find Exact Match Of Values In The List From Regexp Input Parameter"