openactive-archive / opportunity-api

Repository for the Opportunity API specification
0 stars 0 forks source link

Full-text Search #9

Open lukehesluke opened 5 years ago

lukehesluke commented 5 years ago

Proposer

imin

Use Case

As a customer of an Opportunity API, I would like to be able to find opportunities that match some specific text like "run", "park", "spin", "pool", "climb", etc

Why is this not covered by existing properties?

The closest is activity.prefLabel, category.prefLabel. "park" and "pool" could also be covered by amenities or facilities

However, full text search provides greater flexibility and allows a customer to not have to navigate the specifics of the spec

Please provide a link to example data

N/A

Proposal

This does not fit with the Filtering proposal (https://github.com/openactive/opportunity-api/issues/1) as it does not reference a specific field in Events

However, this is also true of sort (https://github.com/openactive/opportunity-api/issues/4) so potentially not a problem

Therefore, how about search

Example

e.g. /?search=park&sort=subEvent.startDate,asc&location.geo[radial]=51.5,-0.28,10

nickevansuk commented 5 years ago

Probably worth looking through some for the references in https://github.com/openactive/opportunity-api/issues/1 for common patterns, e.g. I've noticed ?q= for global search...