a-ok Posted June 9, 2020 Share Posted June 9, 2020 Is it possible for a selector (for search results) to return a page if the title is 'Kettle's' but the search term is 'kettles'? I can't include 'name' in my fields to search (which would've worked) but then if someone searched 'Kettle's' for the page title 'Kettles' it wouldn't work. Thoughts? Link to comment Share on other sites More sharing options...
kongondo Posted June 9, 2020 Share Posted June 9, 2020 Have your tried the special operators? %= or ~= or *=? Link to comment Share on other sites More sharing options...
a-ok Posted June 9, 2020 Author Share Posted June 9, 2020 Yeah tried them all. $results = $pages->find("$fieldsToSearch%=$searchQuery, template=$templatesToSearch, sort=sort, check_access=0"); $resultsToRemove = new PageArray(); foreach ($results as $result) { if ($result->template->name == 'repeater_modulesA' && ($result->getForPage()->is('unpublished') || $result->getForPage()->is('trash'))) { $resultsToRemove->add($result); } } $results = $results->not($resultsToRemove); Link to comment Share on other sites More sharing options...
kongondo Posted June 9, 2020 Share Posted June 9, 2020 Yes. Just did too. They all fail, sorry. 55 minutes ago, a-ok said: can't include 'name' in my fields to search Why can't you? Link to comment Share on other sites More sharing options...
a-ok Posted June 9, 2020 Author Share Posted June 9, 2020 1 hour ago, kongondo said: Why can't you? It’s having a weird conflict with the multiple pageField.title in the selector. If I have one and name, it works fine, if I have multiple without name it works fine. If I have multiple AND name it throws an error referenced here: 1 Link to comment Share on other sites More sharing options...
a-ok Posted February 16, 2023 Author Share Posted February 16, 2023 Does anyone know if this was ever fixed? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now