Improve search to perform basic substring, case-insensitive matches #70
No reviewers
Labels
No Label
bug
compatibility
documentation
duplicate
enhancement
future release
help wanted
invalid
non-code
question
refactor
testing
this release
wontfix
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: cmccabe/linkulator2#70
Loading…
Reference in New Issue
No description provided.
Delete Branch "fix-search"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Search previously would only look for an exact match of a field, which I missed earlier. For example, a link with the title "cat" would be returned if the search term was "cat", but not if it was "c".
A search result should now be returned if the search term is found in any field. It can be the entire field or just a part of the field. Furthermore, searches should be case insensitive.
The main part of this change is that we look for
keyword.lower() in str(record).lower()
where record is a row inlink_data
. If there's a better approach than this, let me know.Along with these changes are tests to cover the situations mentioned (including an existing test that was not written correctly). The test file names have been normalised as well.
Got it and I'm seeing results on the rtc install now!