Integration Guide
Build Geo Search and Rank by Location Quality
Combine standard geo-filters (PostGIS, Elasticsearch) with GeoSci ratings as ranking features. Add neighborhood quality to your search ranking.
- PostGIS & Elasticsearch
- Ranking Features
- Explainable Results
The Problem
Many teams start with "How do I build geo-search in PostGIS/Elasticsearch?" — using ST_DWithin for radius filters and geo_distance in Elasticsearch. Then comes the question: "How do I factor neighborhood quality into ranking?"
How GeoSci Helps
GeoSci ratings deliver numeric scores per location that can be used directly as ranking features. Instead of sorting only by distance, search results can be weighted by location quality.
Architecture Pattern
- Geo-filter: PostGIS
ST_DWithinor Elasticsearchgeo_distancefor radius/bounding-box filtering. - Feature enrichment: Fetch GeoSci ratings per property and store as additional columns/fields.
- Ranking: Weighted combination of geo-distance + GeoSci scores as ranking signal.
- Explainability: Show score breakdown per result, based on GeoSci subratings and POIs.
API Example
# Ratings for a coordinate — scores directly usable as ranking features
curl "https://api.geosci.de/places/13.405,52.52/ratings" \
--header "Authorization: Apikey $GEOSCI_API_KEY" Response (excerpt) — each score can be used as a ranking feature:
{
"ratings": [
{ "name": "shopping", "score": 8.2 },
{ "name": "public_transport", "score": 9.1 },
{ "name": "restaurants", "score": 7.4 },
{ "name": "noise_day", "score": 3.8 },
{ "name": "family_friendliness", "score": 6.5 }
]
} Scores range from 0 (worst) to 10 (best). Use as weighted features in your search ranking formula.