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

Multi match for Functional suggester

Open dmitrymake opened this issue 6 years ago • 1 comments

Hello! Is it possible to make multi-match for functional suggester? I need to make autocomplete for places, so now I use analyzer with trigrams for Complete fields and make an array with all suggested words with different languages, for example: ['Armenia', 'Հայաստան', 'Армения', 'Erevan', 'Երևան', 'Ереван']. It would be great to split this it to 2 different arrays for Country and Citiy and even give a boost to City. Can I do it? And one more thing - is it possible to use serializer from DocumentViewSet for functioanl suggester? It returns field which I search through, so array can be seen above is returned every time I make a functional suggest. Big thanks for this package, love it so much!

dmitrymake avatar Jul 26 '19 16:07 dmitrymake

@DmitryMake:

Can you collaborate a little bit more on this?

I'm pretty sure it's possible to achieve using native suggest functionality as well.

This looks pretty convenient.

Add some options here, cover the changed parts with tests and you're done.

barseghyanartur avatar Aug 15 '19 20:08 barseghyanartur