transitland/transitland-datastore

Operators filter name regexp

fattazzo opened this issue · 1 comments

At this time the filter on the operator name only works if the exact value is entered. Example:
Operator: Trentino Trasporti Esercizio
Works with: https://transit.land/api/v1/operators?name=Trentino%20Trasporti%20Esercizio

Many times the user does not remember the exact name of the operator so it would be useful to search for it using a "like" or "contains" expression. Example:

https://transit.land/api/v1/operators?name=Trentino%20Trasporti

It sounds like "find all the operators that contains Trentino Trasporti". The best thing then is that the search in the name is not case sensitive

irees commented

@fattazzo

Hi. Yes, you are correct that it is currently an exact match. I will see if we can change it to a "like" query, or add another query parameter to provide this option.