TheLens / contracts

An archive of contracts and other documents from the City of New Orleans.
http://vault.thelensnola.org/contracts/
0 stars 0 forks source link

Highlight search text and show surrounding text when displaying search results #3

Open AbeHandler opened 9 years ago

AbeHandler commented 9 years ago

a la document cloud ui

AbeHandler commented 9 years ago

example

See how the searched term is highlighted yellow. We want to do that for our search too. You can get to that via python document cloud

http://python-documentcloud.readthedocs.org/en/latest/documents.html#document_obj.mentions

ThomasThoren commented 8 years ago

This is a good idea, though there can also be cases where the surrounding text is a garbled mess, which would reflect poorly on the app.

screen shot 2016-01-07 at 3 08 49 pm

However, I'd guess that most searches with coherent words will usually turn up coherent text. As long as that's usually the case, this should be added to this round of refactoring. If incoherent text is somewhat common, it isn't worth possibly making the app look bad, broken or untrustworthy.