Substring productsearch (PostgreSQL)
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!
Substring productsearch (PostgreSQL)
Hi,
given a searchterm like: "bar"
-> product with names like "foo bar baz" are found
But products with seachterm as part of a word (substring) are not found:
How / where can we customize the search / SQL behaviour especially for PostgreSQL?
I know that this will degrade the performance; we only have a few articles (< 5.000) but with complex names
thank you
given a searchterm like: "bar"
-> product with names like "foo bar baz" are found
But products with seachterm as part of a word (substring) are not found:
- "barfoobaz"
- "foobarbaz"
How / where can we customize the search / SQL behaviour especially for PostgreSQL?
I know that this will degrade the performance; we only have a few articles (< 5.000) but with complex names
thank you
Re: Substring productsearch (PostgreSQL)
This should be found too because PostgreSQL and all other RDBMs use prefix search.
This can't be found because "bar" is not at the beginning of a word.
You can use the "Standard" index manager implementation, which uses a LIKE search (very slow for 10k+ products but finds strings anywhere):
https://github.com/aimeos/aimeos-larave ... #L287-L306
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: Substring productsearch (PostgreSQL)
Thank you, but still one question.
given following available products name:
seachring for "foobarbaz abc 5kg"
but searching for "bar 5kg"
expected: "foobarbaz abc 5kg"
-> in fact no articles are found
So "Standard index manager" seaches for the exact, entire term ("bar 5kg") and not the individual terms ("bar" and "5kg").
Are there any possibilities to extend the search manager as described?
given following available products name:
- "foobarbaz abc 2kg"
- "foobarbaz abc 5kg"
- "foobarbaz abc 9kg"
- "foobarbaz 2kg"
- "foobarbaz 5kg"
- "foobarbaz 9kg"
seachring for "foobarbaz abc 5kg"
- "foobarbaz abc 5kg"
but searching for "bar 5kg"
expected: "foobarbaz abc 5kg"
-> in fact no articles are found
So "Standard index manager" seaches for the exact, entire term ("bar 5kg") and not the individual terms ("bar" and "5kg").
Are there any possibilities to extend the search manager as described?
Re: Substring productsearch (PostgreSQL)
No, this requires the full text index which splits up the text into words and creates an index for these words. The SQL LIKE based search can't do that.
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