Product filter

How to configure and adapt Aimeos based shops as developer
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
karpati
Posts: 14
Joined: 08 Feb 2022, 20:42

Product filter

Post by karpati » 16 Feb 2022, 19:26

Hello!
In the Catalog/Products list, if I search for something in the Label filter, the search engine searches only at the beginning of the text.
What is the easiest way to search in the middle of te text?

For example:

Keyword: "le12"
Label: Apple123

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

Re: Product filter

Post by aimeos » 17 Feb 2022, 16:37

You can configure the "Standard" index manager instead of the "Mysql" one. MySQL offers full text search which is prefix based like in almost every performant search engine. The "Standard" index manager uses a LIKE-based search which will be painfully slow for more than ~1000 products because it can't use any database index, so use with extreme care!

Code: Select all

'mshop' => [
	'index' => [
		'manager' => [
			'name' => 'Standard'
		]
	]
]
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

karpati
Posts: 14
Joined: 08 Feb 2022, 20:42

Re: Product filter

Post by karpati » 17 Feb 2022, 20:23

Thanks for the reply.
I set up what you wrote, but the admin still doesn't search in the middle of the texts.

Code: Select all

	'mshop' => [
            'index' => [
                    'manager' => [
                            'text' => [
                                    'name' => 'Standard'
                            ]
                    ]
            ], 
            'price' => [
                'precision' => 0
            ]
	],

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

Re: Product filter

Post by aimeos » 21 Feb 2022, 09:28

It must be:

Code: Select all

'mshop' => [
	'index' => [
		'manager' => [
			'name' => 'Standard'
		]
	]
]
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply