Autocomplete not working with elasticsearch

Please report bugs here!

Moderator: Thorsten

Post Reply
rudibr78
Posts: 2
Joined: Fri Apr 28, 2017 1:26 pm

Autocomplete not working with elasticsearch

Post by rudibr78 »

Autocomplete search wasnt working with elasticsearch (advanced search was ok)

Elasticsearch->autocomplete method was passing a "lang" filter which doesnt seem to be working, I changed

Code: Select all

'filter' => [
	'term' => [
		'lang' => $this->getLanguage()
	]
]
to

Code: Select all

'filter' => [
	'terms' => ['category_id' => $this->getCategoryIds()]
],
like it is on the normal search function and it seems to be ok now.

I imagine this temporary fix breaks multi-lingual support tho.
Thorsten
Posts: 15559
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Autocomplete not working with elasticsearch

Post by Thorsten »

Hi,

which Elasticsearch version do you use?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Post Reply