Adjusting "f_search" in Aimeos for Product Search Behavior
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!
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
-
- Posts: 22
- Joined: 10 Oct 2024, 12:51
Adjusting "f_search" in Aimeos for Product Search Behavior
Hi everyone,
I'm using Aimeos's JSONAPI with f_search and noticed something peculiar. When I search for "control sauna," I don't get any results, but when I search for "sauna control" I do. The products have the words "sauna" "saunacontrol" and "control" individually in the title or text.
I would like to adjust how f_search queries the database. Does anyone know where I can modify this behavior? I'm looking for both code-based and configuration-based solutions (e.g., Elastic vs. standard settings).
Thanks in advance for any help!
I'm using Aimeos's JSONAPI with f_search and noticed something peculiar. When I search for "control sauna," I don't get any results, but when I search for "sauna control" I do. The products have the words "sauna" "saunacontrol" and "control" individually in the title or text.
I would like to adjust how f_search queries the database. Does anyone know where I can modify this behavior? I'm looking for both code-based and configuration-based solutions (e.g., Elastic vs. standard settings).
Thanks in advance for any help!
Re: Adjusting "f_search" in Aimeos for Product Search Behavior
Where do you store the product index? MySQL, PostGreSQL, Solr or ElasticSearch?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
-
- Posts: 22
- Joined: 10 Oct 2024, 12:51
Re: Adjusting "f_search" in Aimeos for Product Search Behavior
The MySQL index text manager generates a "MATCH( mindte."content" ) AGAINST( '...' IN BOOLEAN MODE )" statement here:
https://github.com/aimeos/aimeos-core/b ... hp#L25-L30
You can set the log level to 7 (debug) and have a look into the Log panel of the admin backend which SQL statements are used:
https://github.com/aimeos/aimeos/blob/m ... p.php#L247
The MATCH statement should look like this:
This should find products whose texts contain words starting with "control" or "sauna", so "saunacontrol" should be found provided the mshop_index_text.content column contains those words.
https://github.com/aimeos/aimeos-core/b ... hp#L25-L30
You can set the log level to 7 (debug) and have a look into the Log panel of the admin backend which SQL statements are used:
https://github.com/aimeos/aimeos/blob/m ... p.php#L247
The MATCH statement should look like this:
Code: Select all
MATCH( mindte."content" ) AGAINST( 'control* sauna*' IN BOOLEAN MODE )
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star