django-oscar-elasticsearch icon indicating copy to clipboard operation
django-oscar-elasticsearch copied to clipboard

Check if we can always use ES6 completions instead of searching in edgengrams

Open specialunderwear opened this issue 5 years ago • 1 comments

Currently, in an effort not to change any existing functionality, when searching for completions using typeahead when someone types into the search bar, the ES6 completions functionality is used. The existing suggestion functionality that uses edgengrams is left intact. Most likely the completions functionality can fully replace the existing suggestions functionality.

Test and verify that replacing suggestions using edgengrams with ES6 completions works properly and then implement the replacement.

specialunderwear avatar Jun 23 '19 14:06 specialunderwear

Here is the code that adds the _auto_complete fields based on all the AutocompleteField declarations on the models. Each AutocompleteField now yields both and edgengram in the mapping and a completion field. Would be nice if we could drop the edgengrams.

https://github.com/specialunderwear/django-oscar-elasticsearch/blob/master/oscar_elasticsearch/search/search.py#L63

specialunderwear avatar Jun 23 '19 15:06 specialunderwear