Skip to content
This repository has been archived by the owner on Jan 6, 2023. It is now read-only.
This repository has been archived by the owner on Jan 6, 2023. It is now read-only.

Search using (q) parameter could match a field partially, not exactly #743

Closed
ondrakoupil opened this issue Jan 31, 2019 · 2 comments
Closed
Labels
bug Something isn't working

Comments

@ondrakoupil
Copy link

Feature Request

When using "q" parameter (usually using a search field in header bar of directus app), only rows with a field that exactly matches the searched string is returned. However, in practical life, it would be better if field would be matched partially.

Example: In demo, collection "Movies": https://directus.app/#/collections/movies
Try searching "Years". I expect the movie "18 Years Later (Diciotto anni dopo)" to be found, but no result is returned.

It can be bypassed by using a field filter using "contains" mode, however that is more difficult and less intuitive.

What problem does this feature solve?

It is a UX improvement. Users usually expect these "quick search fields" to work this way.

How do you think this should be implemented?

The DB query would be constructed using field LIKE "%VALUE%" instead of field = "VALUE". Or at least for text fields.

Would you be willing to work on this?

I could probably do this, however an experienced directus developer would do this way faster.

@wellingguzman wellingguzman added the bug Something isn't working label Feb 1, 2019
@wellingguzman
Copy link
Contributor

Thanks for reporting this, this is a bug, it has supposed to work this way.

This bug was created while implementing raw like operator/filter.

Ref: 7eca9d9

@wellingguzman
Copy link
Contributor

This bug has been fixed by b8c0cdd

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants