openannotation / annotator-store

A backend store for the Annotator
http://annotateit.org/
MIT License
177 stars 66 forks source link

Introduce before and after parameters for search queries #118

Closed gergely-ujvari closed 9 years ago

gergely-ujvari commented 9 years ago

This PR gives the ability to retrieve annotations created within a time interval. For this the before and after search parameters are introduced to form a range query.

tilgovi commented 9 years ago
gergely-ujvari commented 9 years ago

I voted for using created in the range because I think the creation date is more important then the date when an annotation was lastly edited. About elasticsearch.py you're completely right, sorry I'll move it to annotation.py

Gmail uses after, before, older, newer I think I'll use after and before instead of from and to

gergely-ujvari commented 9 years ago

Okay, I've changed from and to to before and after. Edited the PR title to reflect this.

nickstenning commented 9 years ago

test_search is getting a little ridiculous now. Could you maybe split it up into a couple of different tests -- ideally so that each one is only testing one path.

gergely-ujvari commented 9 years ago

I've split them.

gergely-ujvari commented 9 years ago

Any other comments?

gergely-ujvari commented 9 years ago

@nickstenning ? @tilgovi ?

tilgovi commented 9 years ago

I started playing with a refactor of the search API to make the annotator-store code simpler, but I'll do that separately.