Sign inSign up

hotrungnhan/postgres

By hotrungnhan

•Updated almost 4 years ago

Postgres image with vietnamese full text search

Image
0

5.4K

hotrungnhan/postgres repository overview

GitHub Docker

Make Vietnamese Great Again !!!

⁠Vietnamese Full Text Search Dictionary for Postgres

Due to lack of FTS support for vietnamese in postgres. I've make this project to archive it with by collect all the dictionary in the internet, prebuild it for fastest usage.

For more this image is base on postgres image⁠. As an consequence, fts-image will share the same config and enviroment with postgres, as well.

If you are in docker hub, open github to read the latest guideline

⁠Getting Started

⁠Installation

Docker image will share the same environment with postgres

docker run hotrungnhan/postgres:alpine

Install full text search dictionary via run sql in database

-- add dictionary
CREATE TEXT SEARCH DICTIONARY vietnamese_hunspell (
    TEMPLATE = ispell,
    DictFile = "vietnamese",
    AffFile = "vietnamese",
    Stopwords = "vietnamese"
  );
-- add configuration
CREATE TEXT SEARCH CONFIGURATION vietnamese(
    COPY = english
);
-- alter parser mapping
ALTER TEXT SEARCH CONFIGURATION vietnamese
ALTER MAPPING FOR asciiword, asciihword, hword_asciipart, word, hword, hword_part
WITH vietnamese_hunspell;

----------------------------------------

⁠For builder

⁠Login docker
docker login
⁠Build

change IMAGE_REPOSITORY in upgrade.py to your repository

And

./run.sh

Notes: builder will be auto create cross-platform-builder if not existed

⁠Reference

⁠Stop Word
⁠AFF Word
⁠Dict
⁠Installation

⁠Lisence

MIT⁠

Copyright (c) 2022-present, Ho Trung Nhan

Tag summary

Content type

Image

Digest

sha256:dbb0de396…

Size

90.2 MB

Last updated

almost 4 years ago

docker pull hotrungnhan/postgres