Add default behaviour for automatically generated filter '{q: "value"}' (interpret it as `has_text`)
When a text input is used as a search box (autocomplete inputs, search inputs...) it calls the appopriate dataProvider's function with {q: "<typed text>"}
as filter. Currently it generates a RQL query with the following restriction: EXISTS (X q ILIKE "%<typed text>%)"
. To override the generated filter object we have to pass a filterToQuery
prop to the input. I often use the following value for this prop: (text: string) => ({ has_text: text })
.
I think it could be nice to interpret {q: "text"}
as a way to search using FTI.