Skip to content

Boolean operators in searches #17

@MikeThacker1

Description

@MikeThacker1

There's no clear guidance on how parameters are combined in API GET queries, but most are combined with a boolean AND.

There is a need to use a boolean OR in some circumstances, eg getting services with either of two taxonomy terms.

We'd like to suggest this syntax:
/services?taxonomy_id=esdServiceType:12&taxonomy_id=esdServiceType:13,14,15
for getting services of service type 12 AND (13, 14, or 15)

A simpler implementation would just be the second part using comma-separated values to support am OR operation.

The is approach could be applied to the "?need", "?circumstance" and "?serviceType" parameters supported by implementations designed ton work with these LGA vocabularies.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions