strict search
What needs to be done?
Sometimes you need a filter that doesn't use fuzzy-search.
For some fields, fuzzy search may even be absurd:
For example if I filter field "gender" with value "male" you also will get "female"
Targeted application
Requested by @Marjolaine for project "Énergie Partagée":
The requirement for this project is to filter a field with an empty value.
Technical details
Here are some suggestions of implementation:
strict
attribut
1 - Add <solid-form-search
fields="name, gender"
value-gender="male"
strict
></solid-form-search>
the problem here is that all fields are filtered strictly (in this example, we would keep 'name' to be fuzzy filtered).
fields
list
2 - Add strict operator in <solid-form-search
fields="name, !gender"
value-gender="male"
></solid-form-search>
Here, filters for fields prefixed with a !
are applied in a strict way.
problem: the fields
attribut of solid-form-search
will have a different syntax from solid-display
and even solid-form
3 - Surround the value with quotes
<solid-form-search
fields="name, gender"
value-gender='"male"'
></solid-form-search>
In this case, if the value is enclosed in quotation marks, it is compared strictly.