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 » Fri Apr 28, 2017 6:29 pm

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: 14482
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Autocomplete not working with elasticsearch

Post by Thorsten » Sun May 07, 2017 7:42 am

Hi,

which Elasticsearch version do you use?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest