Skip to content

Latest commit

 

History

History
104 lines (64 loc) · 2.33 KB

File metadata and controls

104 lines (64 loc) · 2.33 KB

postgres-extensions-practice-samples

Postgres extensions practice samples integrate with spring boot

Build status:

Project Status
Projects

Zombodb

Zombodb

Zombodb brings powerful text-search and analytics features to Postgres by using Elasticsearch as an index type. Its comprehensive query language and SQL functions enable new and creative ways to query your relational data.

  • Clone zombodb from source https://github.com/zombodb/zombodb.git

  • Using terminal go to clone folder

  • Config pg_config must be in your $PATH and be the binary for your target Postgres installation. Examples:

export PATH="$PATH:/Applications/Postgres.app/Contents/Versions/10/bin"
  • Make install
make clean install
  • Go to directory /Users/uuhnaut/Library/Application\ Support/Postgres/var-10/ and add this to postgresql.conf && restart postgres
zdb.default_elasticsearch_url = 'http://localhost:9200/'

Pgroonga

Pgroonga

PGroonga is a PostgreSQL extension to use Groonga as the index.

PostgreSQL supports full text search against languages that use only alphabet and digit. It means that PostgreSQL doesn't support full text search against Japanese, Chinese and so on. You can use super fast full text search feature against all languages by installing PGroonga into your PostgreSQL!

- Run docker

cd spring-boot-pgroonga-samples && docker-compose up -d

  • Add extension to db
create extension pgroonga;
  • Create pgroonga index:
CREATE INDEX pgroonga_full_name_index ON account USING pgroonga (full_name);
  • Disable sequential scan to ensure using pgroonga index:
SET enable_seqscan = off;
  • Generate dummy data endpoint
[POST] localhost:8080/accounts
  • Query endpoint:
[GET] localhost:8080/accounts?text=Thomas