-
Notifications
You must be signed in to change notification settings - Fork 24
hooks/issue_query_any_searchable: add multi field AND search #166
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
base: master
Are you sure you want to change the base?
Conversation
aada908
to
cecdd44
Compare
7eded90
to
1f23e75
Compare
def sql_for_any_searchable_field(field, operator, value) | ||
# TODO: Implement AND searches across multiple fields. | ||
super(field, operator, value) | ||
## TODO List | ||
# - filter by match leves('~', '*~') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we try to deal with *~, I think we will have to parse the query but we don't want to do that. So we should think of the other way like announcing it to user using Groonga query.
07490b3
to
816c2a2
Compare
c6e957b
to
2e7a4a0
Compare
🗒️ |
2e7a4a0
to
eeb7f4d
Compare
It seems that some CI jobs are failing. |
Thank you so much.
|
GitHub: GH-163
Problem
The existing "Any searchable text" issue filter cannot perform AND searches across multiple fields.
Cause
The existing implementation of
IssueQuery#sql_for_any_searchable_field
did not handle AND searches for multiple fields. The AND search query construction was limited to single-field searches, and there was no mechanism to build filter conditions that combine criteria across multiple fields.Solution
This change introduces the
FullTextSearch::Hooks::IssueQueryAnySearchable
module, which extendsIssueQuery#sql_for_any_searchable_field
to perform AND searches across multiple fields.Additional Information
Mroonga Support
Currently, the implementation only supports PGroonga.
Mroonga-based systems are not supported yet and will support in the following PR.
OR Search Considerations
If you need OR search functionality, please note that selecting the contains_any_of filter does not perform an OR search. Instead, you must specify the query in Groonga Query style (e.g., using keyword OR keyword) to achieve an OR search.