ucd-library / aggie-experts

Publicly reported feedback and issues for Aggie Experts
https://ucd-library.github.io/aggie-experts/
MIT License
1 stars 2 forks source link

Added Multi-Template, A-Z browse #243

Closed qjhart closed 7 months ago

qjhart commented 7 months ago

This adds an additional feature to the api/browse endpoint. If you do not supply the endpoint with a prefix p, then the API will respond with a result count of all the letters. The result looks like this:

[
{
"params": {
"size": 0,
"from": 0,
"p": "A"
},
"total": 7,
"hits": []
},
{
"params": {
"size": 0,
"from": 0,
"p": "B"
},
"total": 9,
"hits": []
},
...

This may look a little strange at first, but this the equivalent to the idea that the client made a set of template queries like /browse/?p=A&size=0 and then combined them together into an array. This will be consistent if we need to do other multi-template searches.

qjhart commented 7 months ago

@UcDust Please review, and I'll commit

qjhart commented 7 months ago

@UcDust I forgot you were out. I've just commited this, but please review

UcDust commented 7 months ago

@qjhart Seems like what we need, I'll test things out later today.