Comments (4)
same as #41
from pelias.
it would be nice to return the 'total matched results' despite the page length being set to 1-40, this is nice to have in order to derive a 'total pages' count and also for analytics, like 'how many mcdonalds in this bbox' (which is actually quite hard to do with other databases/engines)
eg.
- page length: 40
- results in this page: 40
- total pages: 12
- total results matched: 451
note: some of these values can be computed by the client and some can be returned from the server, the minimum the server should return is "total results" as the others can be inferred from the data and the query params/defaults.
from pelias.
+1 to @missinglink's suggestion
I think you've stubbed out what that would/should look like quite nicely and opens up some more questions like:
- How would one paginate from those maximum number of results? Would they reformulate a query and ask for that total number of results?
- Is that a fundamentally different kind of question from Geocoding? It's certainly a kind of question that our dataset should be capable of answering.
- Would we be able to surface the match count without much of a performance impact?
from pelias.
we get the total count for free, no additional logic would be required outside the code to expose it in the API
from pelias.
Related Issues (20)
- Boost responses by country code HOT 5
- Get postal code in /search or /place API endpoint HOT 6
- [Whosonfirst] API to get the WOF id (concordance) from a GeoName id HOT 4
- [WOF] Get adminCode of regions with /search or /place API endpoint
- [WOF] Cannot find region (administrative area "département") using its 2-digits code (adminCode)
- Update Node.js version support (16, 18, 20) HOT 2
- Update CI and Docker images to Ubuntu 22.04 HOT 4
- Difference between geocode.earth and local install of Pelias ? HOT 1
- Elasticsearch 8 support HOT 19
- Using Overture Maps for Data HOT 6
- Pelias Snapshot Update Date HOT 2
- Inconsistencies in response for the same query (when server overloaded)
- Transcription of German special characters in structured queries
- Venue, data source
- Error Postal Code
- Not able to setup pelias on my server
- While integrating custom WhosOnFirst data, old WOF-data is also available HOT 3
- Inaccurate Reverse Geocoding In Europe HOT 7
- Search for localities and counties of the same name HOT 5
- Additional parameters boundary.region and boundary.locality for autocomplete
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pelias.