Skip to content

Allow exact string search queries (for things like taxa and projects) #336

@kaldari

Description

@kaldari

If I want to retrieve all the genera on iNaturalist called 'Hydria', I would use a query like:
https://api.inaturalist.org/v1/taxa?q=Hydria&is_active=true&rank=genus&all_names=false
Unfortunately, this also retrieves the genus Hydriastele since it starts with the string 'Hydria'. I know I can filter this out in post-processing, but it seems like there should be a way to query for 'Hydria' exactly rather than always doing a prefix search. Maybe a new boolean query parameter could be added called 'prefixsearch' (defaults to true) or 'exactstring' (defaults to false) or something like that.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions