anserini
anserini copied to clipboard
REST API design
@16BitNarwhal will work on this.
A few resources:
- https://stackoverflow.com/questions/30967822/when-do-i-use-path-params-vs-query-params-in-a-restful-api
- https://stackoverflow.blog/2020/03/02/best-practices-for-rest-api-design/
@16BitNarwhal will propose a few designs... @sahel-sh and @ronakice and I will provide feedback.
See https://github.com/castorini/rank_llm/issues/110 for what I mean by "propose a few designs".
Another thing to consider: what does Elasticsearch and OpenSearch expose? One option is just to mirror that?
I'm currently thinking of having the API route like /api/collection/${collection}/search?query=${query}
collection as a path param and query as a query param since collection is a resource and query is for searching the collection (based on the first StackOverflow link)
First impl here #2486 - @16BitNarwhal do you want to leave this issue open or close it?
I think we can close it