StackShareStackShare
Follow on
StackShare

Discover and share technology stacks from companies around the world.

Follow on

© 2025 StackShare. All rights reserved.

Product

  • Stacks
  • Tools
  • Feed

Company

  • About
  • Contact

Legal

  • Privacy Policy
  • Terms of Service
  1. Stackups
  2. Utilities
  3. Search
  4. Search As A Service
  5. Elasticsearch vs PostGIS

Elasticsearch vs PostGIS

OverviewDecisionsComparisonAlternatives

Overview

Elasticsearch
Elasticsearch
Stacks35.5K
Followers27.1K
Votes1.6K
PostGIS
PostGIS
Stacks379
Followers377
Votes30
GitHub Stars2.0K
Forks407

Elasticsearch vs PostGIS: What are the differences?

Introduction

Elasticsearch and PostGIS are both popular tools used for managing and analyzing large amounts of data. However, they have some key differences in terms of functionality and purpose. In this article, we will explore and compare these differences.

  1. Data Structure: Elasticsearch is a search engine that uses a flexible and schema-less JSON-based data structure. It is designed to handle unstructured and semi-structured data efficiently. PostGIS, on the other hand, is an extension of PostgreSQL that adds support for geographic objects. It allows storing and querying spatial data using various geometric and geographic data types.

  2. Querying Capabilities: Elasticsearch offers advanced full-text search capabilities, supporting complex queries including fuzzy search, wildcard search, and phrase matching. It also provides relevance scoring to rank search results based on relevance. PostGIS, however, focuses on spatial queries and offers a wide range of spatial operators and functions to perform spatial analysis and calculations.

  3. Scalability and Distribution: Elasticsearch is built from the ground up to be distributed and scalable. It allows horizontal scaling by adding more nodes to the cluster, enabling data to be distributed across multiple machines. It also provides built-in replication and sharding mechanisms for high availability and performance. PostGIS, on the other hand, is primarily designed as a single-node database system and does not offer native support for distributed architectures.

  4. Indexing and Data Storage: Elasticsearch uses an inverted index for efficient full-text search. It automatically indexes every field in a document, making it suitable for fast text-based searches. PostGIS uses a B-tree index for efficient querying of spatial data. It supports both spatial and non-spatial indexing, allowing for efficient retrieval of specific spatial objects or attribute values.

  5. Data Modeling: Elasticsearch allows for dynamic data modeling, meaning that fields and data types can be modified on-the-fly without requiring a predefined schema. This flexibility is suitable for scenarios where the data structure is not known in advance or frequently changes. PostGIS, however, requires a predefined table schema and is more suitable for scenarios with a fixed or predictable data structure.

  6. Integration and Ecosystem: Elasticsearch has a rich ecosystem with various plugins and integrations available. It seamlessly integrates with other tools like Logstash and Kibana for log analysis and visualization. It also provides APIs and libraries for easy integration with different programming languages. PostGIS, being an extension of PostgreSQL, benefits from the vast ecosystem and features of the PostgreSQL database, including transaction support, user management, and support for other data types.

In summary, Elasticsearch is a search engine designed for full-text search and scalable, distributed data processing, while PostGIS is an extension of PostgreSQL specifically tailored for spatial data management and analysis.

Share your Stack

Help developers discover the tools you use. Get visibility for your team's tech choices and contribute to the community's knowledge.

View Docs
CLI (Node.js)
or
Manual

Advice on Elasticsearch, PostGIS

Rana Usman
Rana Usman

Chief Technology Officer at TechAvanza

Jun 4, 2020

Needs adviceonFirebaseFirebaseElasticsearchElasticsearchAlgoliaAlgolia

Hey everybody! (1) I am developing an android application. I have data of around 3 million record (less than a TB). I want to save that data in the cloud. Which company provides the best cloud database services that would suit my scenario? It should be secured, long term useable, and provide better services. I decided to use Firebase Realtime database. Should I stick with Firebase or are there any other companies that provide a better service?

(2) I have the functionality of searching data in my app. Same data (less than a TB). Which search solution should I use in this case? I found Elasticsearch and Algolia search. It should be secure and fast. If any other company provides better services than these, please feel free to suggest them.

Thank you!

408k views408k
Comments
Kyle
Kyle

Web Application Developer at Redacted DevWorks

Dec 3, 2019

Decided

When I found out how powerful PostGIS was, I was gobsmacked. No matter how ridiculous that sample data I'd provide, the results would be fast and come back accurate and consistently.

The only other database engine that offered decent GIS indexing and searching, was ElasticSearch. But ES is not an ACID adhering engine, and is specifically designed to be a screaming fast fulltext search engine first, and everything else second. You never want ES to be your primary database engine (it's not designed for that anyways), it should always be a compliment to your more stable and consistent database solution.

Simply put, I could have stuck to a MySQL + ElasticSearch solution, but the operating costs around that get astronomical when you get down to ho HEAVY ElasticSearch is, and how expensive it is to operate in the any hosting solution.

PostGIS allows to me not need ES for geospatial indexing and querying, and to be really fast at it while doing it. A god send.

3.85k views3.85k
Comments

Detailed Comparison

Elasticsearch
Elasticsearch
PostGIS
PostGIS

Elasticsearch is a distributed, RESTful search and analytics engine capable of storing data and searching it in near real time. Elasticsearch, Kibana, Beats and Logstash are the Elastic Stack (sometimes called the ELK Stack).

PostGIS is a spatial database extender for PostgreSQL object-relational database. It adds support for geographic objects allowing location queries to be run in SQL.

Distributed and Highly Available Search Engine;Multi Tenant with Multi Types;Various set of APIs including RESTful;Clients available in many languages including Java, Python, .NET, C#, Groovy, and more;Document oriented;Reliable, Asynchronous Write Behind for long term persistency;(Near) Real Time Search;Built on top of Apache Lucene;Per operation consistency;Inverted indices with finite state transducers for full-text querying;BKD trees for storing numeric and geo data;Column store for analytics;Compatible with Hadoop using the ES-Hadoop connector;Open Source under Apache 2 and Elastic License
Processing and analytic functions for both vector and raster data for splicing, dicing, morphing, reclassifying, and collecting/unioning with the power of SQL;raster map algebra for fine-grained raster processing;Spatial reprojection SQL callable functions for both vector and raster data;Support for importing / exporting ESRI shapefile vector data via both commandline and GUI packaged tools and support for more formats via other 3rd-party Open Source tools
Statistics
GitHub Stars
-
GitHub Stars
2.0K
GitHub Forks
-
GitHub Forks
407
Stacks
35.5K
Stacks
379
Followers
27.1K
Followers
377
Votes
1.6K
Votes
30
Pros & Cons
Pros
  • 329
    Powerful api
  • 315
    Great search engine
  • 231
    Open source
  • 214
    Restful
  • 200
    Near real-time search
Cons
  • 7
    Resource hungry
  • 6
    Diffecult to get started
  • 5
    Expensive
  • 4
    Hard to keep stable at large scale
Pros
  • 25
    De facto GIS in SQL
  • 5
    Good Documentation
Integrations
Kibana
Kibana
Beats
Beats
Logstash
Logstash
PostgreSQL
PostgreSQL

What are some alternatives to Elasticsearch, PostGIS?

dbForge Studio for MySQL

dbForge Studio for MySQL

It is the universal MySQL and MariaDB client for database management, administration and development. With the help of this intelligent MySQL client the work with data and code has become easier and more convenient. This tool provides utilities to compare, synchronize, and backup MySQL databases with scheduling, and gives possibility to analyze and report MySQL tables data.

Algolia

Algolia

Our mission is to make you a search expert. Push data to our API to make it searchable in real time. Build your dream front end with one of our web or mobile UI libraries. Tune relevance and get analytics right from your dashboard.

dbForge Studio for Oracle

dbForge Studio for Oracle

It is a powerful integrated development environment (IDE) which helps Oracle SQL developers to increase PL/SQL coding speed, provides versatile data editing tools for managing in-database and external data.

dbForge Studio for PostgreSQL

dbForge Studio for PostgreSQL

It is a GUI tool for database development and management. The IDE for PostgreSQL allows users to create, develop, and execute queries, edit and adjust the code to their requirements in a convenient and user-friendly interface.

dbForge Studio for SQL Server

dbForge Studio for SQL Server

It is a powerful IDE for SQL Server management, administration, development, data reporting and analysis. The tool will help SQL developers to manage databases, version-control database changes in popular source control systems, speed up routine tasks, as well, as to make complex database changes.

Liquibase

Liquibase

Liquibase is th leading open-source tool for database schema change management. Liquibase helps teams track, version, and deploy database schema and logic changes so they can automate their database code process with their app code process.

Sequel Pro

Sequel Pro

Sequel Pro is a fast, easy-to-use Mac database management application for working with MySQL databases.

DBeaver

DBeaver

It is a free multi-platform database tool for developers, SQL programmers, database administrators and analysts. Supports all popular databases: MySQL, PostgreSQL, SQLite, Oracle, DB2, SQL Server, Sybase, Teradata, MongoDB, Cassandra, Redis, etc.

dbForge SQL Complete

dbForge SQL Complete

It is an IntelliSense add-in for SQL Server Management Studio, designed to provide the fastest T-SQL query typing ever possible.

Knex.js

Knex.js

Knex.js is a "batteries included" SQL query builder for Postgres, MySQL, MariaDB, SQLite3, and Oracle designed to be flexible, portable, and fun to use. It features both traditional node style callbacks as well as a promise interface for cleaner async flow control, a stream interface, full featured query and schema builders, transaction support (with savepoints), connection pooling and standardized responses between different query clients and dialects.

Related Comparisons

Bootstrap
Materialize

Bootstrap vs Materialize

Laravel
Django

Django vs Laravel vs Node.js

Bootstrap
Foundation

Bootstrap vs Foundation vs Material UI

Node.js
Spring Boot

Node.js vs Spring-Boot

Liquibase
Flyway

Flyway vs Liquibase