CDRH / api

Codenamed "Apium": An API to access all public Center for Digital Research in the Humanities resources
https://cdrhdev1.unl.edu/api_frontend
MIT License
3 stars 1 forks source link

pick separation character for URL #19

Closed jduss4 closed 7 years ago

jduss4 commented 7 years ago

In the Swagger docs we were using a pipe for things like:

?f[]=novel|persuasion&novel|sense+and+sensibility

Need to find a character that will likely not be used in titles, categories, names, etc. (gorram "Yellowstone Kelly: That Dude's Name" ) and use that

jduss4 commented 7 years ago

I decided to stick with a pipe for now, and the API is just looking for either | or %7C which is the pipe encoded.

jduss4 commented 7 years ago

This is how the following are being handled, now. Input requested from @techgique and @karindalziel

Filter separators: |

Sorting filters: |

Nested Fields: .

Faux Nested Fields (aka DATE HISTOGRAMS): .

Does the above make sense? I can come up with some other examples, too, if needed. I specifically want to make sure that the date distinctions make sense to everybody.

karindalziel commented 7 years ago

Ah, I thought we were using the | only to separate multiples, I misunderstood. I guess we just repeat the field for those, huh?

I have a slight preference for f[]=category:Writings but you're right that : might be used elsewhere. In solr, the standard is to put things in quotation marks f[]=category:"Writings" if there's likey to be any confusion.

Do you think we should add the option of quotation marks just in case the | characters shows up somewhere? (f[]=person|"Weird|Person") or do you think that's too paranoid?

jduss4 commented 7 years ago

We're going with the pipe for now! This will require more testing if something has a pipe in its name, but we can investigate that in a different issue