django-oscar-elasticsearch
django-oscar-elasticsearch copied to clipboard
Check if we can always use ES6 completions instead of searching in edgengrams
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.
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