- Merge request !363248191 : Fulltext search facet (without tests). → (Open) created by Julien Tekrane
- Status changed to Needs review
about 2 years ago 7:12pm 15 March 2023 - last update
almost 2 years ago 21 pass - Status changed to RTBC
11 months ago 10:50am 18 July 2024 - 🇬🇷Greece vensires
It's been a year I am using the patch in various projects so - now that we have a stable release - it's time I set it as RTBC.
- 🇫🇷France Julien Tekrane
Dear @vensires, thank you for your appreciation but my PR does not contain tests so the maintainers will not merge it. I don't have dedicated time to implement it, I leave the floor to whoever wants it
- 🇬🇷Greece vensires
Thank you for your effort nevertheless!
I will keep it as RTBC until the maintainers decide otherwise. For now, I just add the tag "Needs tests". - 🇧🇷Brazil carolpettirossi Campinas - SP
I'm using the MR code along with an Aggregate Fulltext field successfully
Thank you so much for contributing =D - 🇬🇷Greece vensires
For a website of ours, I use this fulltext facet filter to search for keywords. The client asked that whether user searches for "foo bar" or "bar foo" the returned result should be the same. I tried playing around tampering the query using proper Search API Events but instead fell back on changing the original patch from this issue's MR (attached) so that the 'LIKE' operator uses multiple conditions instead using AND.
I'm sharing this here too in case we would like a different approach for this or propose a different operator... Maybe...
if ($operator === 'LIKE') { $or_condition_group = $this->query->createConditionGroup('AND'); $tokens = preg_split('/\s+/', trim($this->fulltext->getSearch()), -1, PREG_SPLIT_NO_EMPTY); foreach ($tokens as $token) { $or_condition_group->addCondition($this->facet->getFieldIdentifier(), $token); } $this->query->addConditionGroup($or_condition_group); }