django-elasticsearch-dsl-drf icon indicating copy to clipboard operation
django-elasticsearch-dsl-drf copied to clipboard

Filter feature 'not contains' suggestion

Open allwinjandrews opened this issue 5 years ago • 1 comments

I am working on integrating Elastic Search in my existing Django REST application. In their documentation 'exclude' query param is provided. But the query only when we provide the full field value.

search-url?field__exclude=<field-value

For eg: If I have a value 'Stackoverflow' in field 'name'. I'll have to provide query param a ?name__exclude=Stackoverflow to exclude records having 'Stackoverflow' as name in the result.

Describe the solution you'd like

I would like to implement a search in such a way that when I provide 'over', I need to exclude these records, similar to ?name__exclude=over. This should exclude records containing 'over' in the field value

allwinjandrews avatar Nov 26 '20 05:11 allwinjandrews

Is this search functionality or filter functionality?

If search, you could use simple query string backend for this.

barseghyanartur avatar Jan 17 '21 23:01 barseghyanartur