aparo / pyes

Python connector for ElasticSearch - the pythonic way to use ElasticSearch

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Filtering on specific fields when using suggestion

carllopez opened this issue · comments

Considering the following:

obj = pyes.Suggest()
obj.add_completion(text, 'region', 'suggest_region', size=size)
obj.add_completion(text, 'city', 'suggest_city', size=size)

is there a way to add an exclude filter on a field, eg.

obj.add_exclusion('Spain', 'country')

to not return results that match country='Spain' ?