Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH Search all summary fields and split words #10055

Conversation

emteknetnz
Copy link
Member

@emteknetnz emteknetnz commented Aug 12, 2021

POC, don't merge

Issue #9356

  1. Searches all summary_fields (or searchable_fields if available e.g. Member table)
  2. Splits words on spaces

In both cases it does a WHERE .. OR on things

I think that 1) is good, I'm not entirely sure if 2) is entirely good because it won't put the most relevant search results at the top e.g. if searching on 3 words and it matches all 3, it won't necessarily put that as the top search result. Weight is the same something that partially matched on a single word. This might be considered OK though.

I'd prefer we don't attempt to go too far with this at this stage, we're not trying to build a fully fledged search engine :-) I think what we have here is a significant improvement.

Should probably point to the 4 branch because it's a behaviour change

Some front end changes are probably required within the admin module to tidy up the UX when using the advanced filter, possibly disable the 'summary_fields' field and remove the placeholder text

@emteknetnz emteknetnz force-pushed the pulls/4.8/search-summary-fields branch 6 times, most recently from 436d3f9 to fe61184 Compare August 13, 2021 01:16
@emteknetnz emteknetnz force-pushed the pulls/4.8/search-summary-fields branch from fe61184 to 0d3b9de Compare August 13, 2021 01:19
@emteknetnz emteknetnz closed this Aug 13, 2021
@emteknetnz
Copy link
Member Author

SQL it writes is kind of wrong when using the new disjunctive when searching for "lorem ipsum"

 WHERE ((("Member"."FirstName" LIKE "lorem") OR ("Member"."FirstName" LIKE "ipsum))
 OR (("Member"."Surname" LIKE "lorem") OR ("Member"."Surname" LIKE "ipsum))
 OR (("Member"."Email" LIKE "lorem") OR ("Member"."Email" LIKE "ipsum)))

Other PR writes better SQL

@maxime-rainville maxime-rainville deleted the pulls/4.8/search-summary-fields branch May 31, 2022 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant