Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

request for api on count of entries #25

Open
rlzijdeman opened this issue Oct 12, 2020 · 1 comment
Open

request for api on count of entries #25

rlzijdeman opened this issue Oct 12, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@rlzijdeman
Copy link

Whilst advocating the WHGazetteer, I was trying to find the number of entities of featureClass 'p' in a given region. Could that be added as a feature of the API? Perhaps whilst allowing for a time range? So something along the lines of:

/api/db/?N - total number of places in WHGazetteer
/api/db/?N&ccode="NL" - total number of places in the Netherlands
/api/db/?N&?ccode="NL"&?year>1500 - total number of places in the Netherlands that existed at some point after 1500

Perhaps featureless itself ought to be part of the query, but to honest, I guess most will be interested in p or a.

@kgeographer kgeographer added the enhancement New feature or request label Nov 28, 2021
@kgeographer
Copy link
Member

kgeographer commented Aug 5, 2022

Straightforward to implement. Raises an issue #45 -- speed of queries against the database (which has everything) is much worse than against an Elasticsearch index. Maybe further use of a separately and automatically maintained index of some basic info from the database. Upon making a dataset public, its simplified records are added to a sort of hash index. They would have to be scrubbed or replaced if/when the dataset was updated or removed.

At present, the database indexes have not been optimized; it's possible if they were, speed of such queries against the database would be acceptable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants