Closed gergely-ujvari closed 9 years ago
created
and not updated
?elasticsearch.py
rather than annotation.py
?from
to mean what we call offset
? What other language could we use for date ranges? For instance, Gmail has advanced search tricks, I think. What do they use?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
Okay, I've changed from
and to
to before
and after
.
Edited the PR title to reflect this.
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.
I've split them.
Any other comments?
@nickstenning ? @tilgovi ?
I started playing with a refactor of the search API to make the annotator-store code simpler, but I'll do that separately.
This PR gives the ability to retrieve annotations created within a time interval. For this the
before
andafter
search parameters are introduced to form a range query.