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

highlights on non "text" fields #52

Closed jduss4 closed 7 years ago

jduss4 commented 7 years ago

by "text" I mean literally our field named "text" in the api. Right now if you search within, say, the "annotations" field you will receive results but no highlighting. Need to adapt to return all highlights!

Questions:

highlights: {
  "text" => [ 1, 2, 3 ],
  "annotations" => [ 1, 2, 3 ],
}
karindalziel commented 7 years ago

Hmm. That's a good question and I am not sure. My gut is saying distinctly but I think we might want to ask the cather folks.

karindalziel commented 7 years ago

I decided on separate for now, we could revisit later if needed!

jduss4 commented 7 years ago

Okay! We can always make it look like the same field for the cather folks this way :)

karindalziel commented 7 years ago

That's what I figured, gives more styling options

jduss4 commented 7 years ago

This appears to have been done a few days after this issue: https://github.com/CDRH/api/commit/c7a3795a0a19b48ec7c5b812bf07c28c89c9e1f2#diff-acac9d94ee5288332c2f7509d90ece97

A question remains for me whether or not annotations should appear by default for ALL fields being text searched when hl is true, right now you have to opt in with hl_fl but I'll open a new issue for it