gbv / elma

Entity Lookup Microservice API (ELMA)
http://gbv.github.io/elma/
6 stars 0 forks source link

pagination #9

Open cKlee opened 8 years ago

cKlee commented 8 years ago

Hi Jakob,

please correct me if I'm wrong. But this spec suffers from pagination. Otherwise

 http://example.org/elma?search=*

could be disastrous.

nichtich commented 8 years ago

First http://example.org/elma?search=* will search for literal * as the spec says

the query parameter “search” SHOULD NOT be expected to follow a specific search syntax or query language but a plain string.

The result set is expected to be relevance-ranked, so it will be very large most times anyway. It's up to the service to decide how many of the most relevant results to return. I should add a note about practical expectations (10 to 20?) and the suitability for typeahead (right-truncation should be ranked higher than left-truncation and inword-truncation).

Pagination will be specified in JSKOS-API (superset of ELMA) but this is a different use case (boolean search for complete result sets vs. relevance ranking for best matching results).

cKlee commented 8 years ago

Aha! So search will always work on labels only? It's not very clear this spec is for search suggestions only. I thought of an slim API for browsing/crawling also. Issue might be closed.