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

Fix search #519

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fix search #519

wants to merge 1 commit into from

Conversation

Degit22
Copy link

@Degit22 Degit22 commented Apr 21, 2022

The reviews asked to fix the search. Normal search in this implementation of access to the database does not work, I did what I could. It may be worth making a limit on the minimum number of characters or starting a search by a button, but on a test base of several hundred records, it worked fine.

@Degit22 Degit22 changed the title fix search Fix search Apr 21, 2022
@tanriol
Copy link
Member

tanriol commented Apr 24, 2022

While I'm okay with doing this in principle, this is not the right place for FTS filtering. For example, as currently implemented, all actions "for every item in the current view" would apply to items filtered out by the search filter too.

Query has some remains of the old implementation:

  • Query._ftsMatches
  • fullTextSearch in Query._filters
    IMHO, it would be better to:
  • ensure that Query._directFilter's filter function calls _ftsMatches (or return a separate function with FTS support as this is likely to be a rare case)
  • implement _ftsMatches (ideally it would be nice to have query syntax support, but a substring match should work for an initial implementation)
  • ensure everything else is plumbed so that the value actually gets there.

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.

2 participants