Search in all languages

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
olexandersh
Posts: 7
Joined: 22 Oct 2019, 16:43

Search in all languages

Post by olexandersh » 22 Oct 2019, 16:47

Hello, Aimeos!
I didn't find answer in google that's why please help me. I need to make search within all languages of our shop. Now it searchs within current language of the shop. What I have to do for it? I found menthod in Product frontend controller addFilterText(). How to force it to use 2 language ids 'en' & 'de'?
Thank you for help!

User avatar
aimeos
Administrator
Posts: 7866
Joined: 01 Jan 1970, 00:00

Re: Search in all languages

Post by aimeos » 23 Oct 2019, 08:24

You can extend the product frontend controller and add another condition for your fallback language (OR combination) here:
https://github.com/aimeos/ai-controller ... #L447-L449
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

olexandersh
Posts: 7
Joined: 22 Oct 2019, 16:43

Re: Search in all languages

Post by olexandersh » 23 Oct 2019, 08:42

Will try.
And how can I override Aimeos\MShop\Index\Manager\Text\MySQL manager from aimeos-core?
I created for this new manager in myext/lib/custom/src/MShop/Index/Manager/Text folder with namespace 'Aimeos\MShop\Index\Manager\Text' and wrote config in shop.php

Code: Select all

'mshop' => [
	'index' => [
            'manager' => [
                'name' => 'MySQL',
                'attribute' => [
                  'name' => 'MySQL'
                ],
                'catalog' => [
                    'name' => 'MySQL'
                ],
                'price' => [
                    'name' => 'MySQL'
                ],
                'supplier' => [
                    'name' => 'MySQL'
                ],
                'text' => [
                    'name' => 'Mymanager'
                ]
            ]
But it doesn't work. Only MySQL class takes from aimeos-core.

olexandersh
Posts: 7
Joined: 22 Oct 2019, 16:43

Re: Search in all languages

Post by olexandersh » 23 Oct 2019, 09:10

And have also another problem: search doesn't work with numbers. If search string is 'article' it works, but if search string is 'article 123' it doesn't work. And there is product with name 'article 123'.

User avatar
aimeos
Administrator
Posts: 7866
Joined: 01 Jan 1970, 00:00

Re: Search in all languages

Post by aimeos » 24 Oct 2019, 08:29

Your configuration for your new manager should normally work.

In 2019.10.x-dev, there's a commit that makes full text search less restrictive:
https://github.com/aimeos/aimeos-core/c ... e6195b32e9
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply