setting up elasticSearch with Postgresql

Viewed 29462

where do I find a howto to set up elasticSearch using Postgres?

My field sizes will be about 350mb, yes, MB, each in size. I have a text output of all of the US Code and all decisions from all the courts, the Statutes at Large, pretty much everything you would find in a library, and I need to be able to do full text searches and return the exact point in the field to the app to return the exact page in PDF form. Postgres can easily handle the datastore, but I've never used elasticSearch and have no idea of how it integrates into the indexing, etc.

4 Answers

You can explore using pgsync.

PGSync is an open-source middleware (written in python) for syncing data from Postgres to Elasticsearch effortlessly. It allows you to keep Postgres as your source of truth and expose structured denormalized documents in Elasticsearch.

Githib link: https://github.com/toluaina/pgsync

Its possible to insert/update/delete postgres data in elasticsearch without middle ware other than the pgsql_http extension. Using triggers you can get a pretty much real-time index update.

You can also query elasticsearch and use the results within postgres to do joins etc with other tables/data in your database.

See the elasticsearch examples: https://github.com/sysadminmike/pgsql-http_examples

Related