YEAR/proxy_edm_year range query

40 views
Skip to first unread message

Kamil Berger

unread,
Oct 7, 2020, 4:22:03 AM10/7/20
to Europeana API forum
Hi,

it is me again, still working with Europeana API :)

I have question to you about YEAR/proxy_edm_year range query. Some of my queries return incomprehensible results. When call API for range [8 TO 9] i have 3 records but I call for [8 TO 10] there is not results. What could be the reason? Another thing is that when I want to call for range 600-2000 I need to send 0600-2000. Examples:

[8 TO 9]
https://api.europeana.eu/record/v2/search.json?wskey= <KEY>&profile=facets&start=1&rows=20&query=warszawa+AND+proxy_edm_year%3A%5B8+TO+9%5D&&sort=score%2Bdesc&theme=photography

[8 TO 10]
https://api.europeana.eu/record/v2/search.json?wskey= <KEY>&profile=facets&start=1&rows=20&query=warszawa+AND+proxy_edm_year%3A%5B8+TO+10%5D&&sort=score%2Bdesc&theme=photography

[600 TO 2000]
https://api.europeana.eu/record/v2/search.json?wskey= <KEY>&profile=facets&start=1&rows=20&query=warszawa+AND+proxy_edm_year%3A%5B600+TO+2000%5D&&sort=score%2Bdesc&theme=photography

[0600 TO 2000]
https://api.europeana.eu/record/v2/search.json?wskey=<KEY>&profile=facets&start=1&rows=20&query=warszawa+AND+proxy_edm_year%3A%5B0600+TO+2000%5D&&sort=score%2Bdesc&theme=photography

Jolan Wuyts

unread,
Oct 7, 2020, 8:55:56 AM10/7/20
to Europeana API forum
Hiya Kamil,

Thanks for your question! Using date mathematics is, in theory, possible on all time-based fields in our Search API. The only field that currently returns reliable results, however, is timestamp_created and timestamp_update. These are the only two fields that are completely homogeneous in the way they handle date formats. The proxy_edm_year field is, however, a field with very heterogeneous data expressed as strings, not as a disambiguated date format. That is why your first search, '8 to 9', returned results that had both the strings '8' and '9' in the proxy_edm_year field. Since there seem to be no records with both the '8' and '10' string in their proxy_edm_year field, your second query returned no results. 

I hope that has sufficiently explained your results! If you're looking to search within a certain range, it might be useful to use variants of the same date so you can catch as many objects that are within that date range as possible. If you're looking for objects created in the 19th century, for instance, you might want your query to look something like proxy_edm_year:(19th OR "19th Century" OR 18xx OR "1801" OR 19-th)

Best

Jolan 

Hugo Manguinhas

unread,
Oct 8, 2020, 3:38:07 AM10/8/20
to europe...@googlegroups.com
Dear Kamil,

Thank you for your email.

Adding to what Jolan explained, the proxy_edm_year is being indexed as a String so if you apply a range query, it will consider the range in lexicographic order that is why in some situations it does not match the numeric order one would expect from a year. Btw, this field only has values reflecting years so ranging from 1 to 4 digits. 

This is a limitation that we are looking to solve in our next version of the API where we will review all fields. It will likely be replaced by a proper Date field where you will be able to search with any form of date ranges. 

Hope this limitation does not prevent you from fulfilling your needs. If you have any questions, please let us know.

With best regards,
Hugo Manguinhas

Disclaimer: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are
addressed. If you have received this email in error please notify the system manager. If you are not the named addressee you should not disseminate,
distribute or copy this email. Please notify the sender immediately by email if you have received this email by mistake and delete this email from your
system.

--
Visit Europeana Labs for API Documentation, Open Datasets, and our Apps Showcase - http://labs.europeana.eu
---
You received this message because you are subscribed to the Google Groups "Europeana API forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to europeanaAPI...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/europeanaAPI/8e5a323b-7ff1-43b8-8686-e52818b42ee7n%40googlegroups.com.


--
Hugo Manguinhas | Product Manager API
T: +31 (0)70 3140657

E: hugo.ma...@europeana.eu | Skype: hugo.manguinhas

We continue to work from home until 1 September 2020. You can read more about how we are doing that here.

 

Be part of Europe's online cultural movement - join the Europeana Network Association: Sign up for the Association | #AllezCulture| @Europeanaeu | Europeana Pro website


Disclaimer: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are
addressed. If you have received this email in error please notify the system manager. If you are not the named addressee you should not disseminate,
distribute or copy this email. Please notify the sender immediately by email if you have received this email by mistake and delete this email from your
system.

Kamil Berger

unread,
Oct 8, 2020, 4:39:02 AM10/8/20
to Europeana API forum
Thank you Jolan and Hugo for your  explanations.  It makes sense to me now :)

KB  

Reply all
Reply to author
Forward
0 new messages