PostgreSQL: product search with multiple terms
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!
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Re: PostgreSQL: product search with multiple terms
tried it once again; results are not ranked by phrase queries
A product that exactly matches the search term is listed somewhere in between of the result product list
How can I retrieve the search query? Set log/manager/standard/loglevel to 7, but could not find the query .
A product that exactly matches the search term is listed somewhere in between of the result product list
How can I retrieve the search query? Set log/manager/standard/loglevel to 7, but could not find the query .
Re: PostgreSQL: product search with multiple terms
Did you set your configuration correctly in your ./config/shop.php?
Code: Select all
'madmin' => [
'log' => [
'manager' => [
'standard' => [
'loglevel' => 7
]
]
]
],
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
Re: PostgreSQL: product search with multiple terms
The config.php setting was correct, but could not finde a PgSQL protocol entry before, saved config.php file again and now its listed - anyway, here the logged PgSQL query: (term1 = "paprika"; term2 = "rot")
Code: Select all
Class: Aimeos\MShop\Index\Manager\PgSQL
SELECT mpro."id" , MIN(mpro."code") AS "s0", MIN(ts_rank(to_tsvector(mindte."content"), to_tsquery( 'paprika:* | rot:* | "paprika <-> rot"' ))) AS "s1"
FROM "mshop_product" AS mpro
LEFT JOIN "mshop_index_catalog" AS mindca ON mindca."prodid" = mpro."id"
LEFT JOIN "mshop_index_text" AS mindte ON mindte."prodid" = mpro."id"
WHERE ( ( mpro."siteid" = '1.' OR mpro."siteid" = '' ) AND ( mindca."catid" IS NOT NULL AND ( mpro."status" = 1 AND ( mpro."type" = 'event' OR mpro."start" IS NULL OR mpro."start" <= '2021-01-09 12:42:00' ) AND ( mpro."end" IS NULL OR mpro."end" >= '2021-01-09 12:42:00' ) ) AND ( mindte."siteid" = '1.' OR mindte."siteid" = '' ) AND mindte."langid" = 'de' AND CAST( to_tsvector(mindte."content") @@ to_tsquery( 'paprika:* | rot:* | "paprika <-> rot"' ) AS integer ) > 0 ) )
GROUP BY mpro."id"
ORDER BY "s0" ASC, "s1" DESC
OFFSET 0 ROWS FETCH NEXT 48 ROWS ONLY
Re: PostgreSQL: product search with multiple terms
You sort by product code first, so the ranking doesn't have any effect:
Code: Select all
MIN(mpro."code") AS "s0"
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
Re: PostgreSQL: product search with multiple terms
ohh, yes indeed
we are using client/html/catalog/lists/sort => 'code'
is it possible to list products by code in category lists (without any search terms)
but to list by relevance (and not by product code) when search term(s) is/are used?
we are using client/html/catalog/lists/sort => 'code'
is it possible to list products by code in category lists (without any search terms)
but to list by relevance (and not by product code) when search term(s) is/are used?
Re: PostgreSQL: product search with multiple terms
If you create you own controller/action with the catalog/tree and add the setting in that method to the configuration, then it will be only used by that page.
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