pgroonga
使用Groonga,面向所有语言的高速全文检索平台
Module:
Categories:
扩展总览
PIGSTY 第三方扩展: pgroonga
: 使用Groonga,面向所有语言的高速全文检索平台
基本信息
- 扩展编号: 2110
- 扩展名称:
pgroonga
- 标准包名:
pgroonga
- 扩展类目:
FTS
- 开源协议: PostgreSQL
- 官方网站: https://github.com/pgroonga/pgroonga
- 编程语言: C
- 其他标签: 无
- 备注信息: 无
元数据
- 默认版本: 4.0.0
- PG大版本:
17
,16
,15
,14
,13
- 动态加载: 无需动态加载
- 需要DDL: 需要执行
CREATE EXTENSION
DDL - 可重定位: 无法安装至任意模式下
- 信任程度: 受信任,无需超级用户,带
CREATE
权限的用户可以直接创建 - 所需模式: 无
- 所需扩展: 无
软件包
- RPM仓库:PIGSTY
- RPM包名:
pgroonga_$v*
- RPM版本:
4.0.0
- RPM依赖:
groonga-libs
- DEB仓库:PIGSTY
- DEB包名:
postgresql-$v-pgroonga
- DEB版本:
4.0.0
- DEB依赖:
libgroonga0
最新版本
扩展安装
使用 pig
命令行工具安装 pgroonga
扩展:
pig ext install pgroonga
使用 Pigsty剧本 安装 pgroonga 扩展:
./pgsql.yml -t pg_extension -e '{"pg_extensions": ["pgroonga"]}' # -l <集群名>
dnf install pgroonga_17*;
dnf install pgroonga_16*;
dnf install pgroonga_15*;
dnf install pgroonga_14*;
dnf install pgroonga_13*;
apt install postgresql-17-pgroonga;
apt install postgresql-16-pgroonga;
apt install postgresql-15-pgroonga;
apt install postgresql-14-pgroonga;
apt install postgresql-13-pgroonga;
使用以下 SQL 命令在已经安装此扩展插件的 PG 集群上 启用 pgroonga
扩展:
CREATE EXTENSION pgroonga;
使用方法
- https://pgroonga.github.io/
- News: It lists release information.
- Overview: It describes about PGroonga.
- Install: It describes how to install PGroonga.
- Upgrade: It describes how to upgrade PGroonga.
- Uninstall: It describes how to uninstall PGroonga.
- Tutorial: It describes how to use PGroonga step by step.
- FAQ: Frequently asked questions.
- How to: It describes about useful information for specific situations.
- Reference: It describes details for each features such as options, functions and operators.
- Troubleshooting: It describes how to fix troubles.
- Community: It introduces about PGroonga community.
- Users: It lists PGroonga users.
- Development: It describes how to develop PGroonga.
Here’s a quick tutorial about how to use PGroonga:
CREATE EXTENSION IF NOT EXISTS pgroonga;
CREATE TABLE memos
(
id integer,
content text
);
CREATE INDEX pgroonga_content_index ON memos USING pgroonga (content);
INSERT INTO memos VALUES (1, 'PostgreSQL is a relational database management system.');
INSERT INTO memos VALUES (2, 'Groonga is a fast full text search engine that supports all languages.');
INSERT INTO memos VALUES (3, 'PGroonga is a PostgreSQL extension that uses Groonga as index.');
INSERT INTO memos VALUES (4, 'There is groonga command.');
SET enable_seqscan = off;
-- now let's query pgroonga
SELECT * FROM memos WHERE content &@ 'engine';
-- id | content
-- ----+------------------------------------------------------------------------
-- 2 | Groonga is a fast full text search engine that supports all languages.
-- (1 row)
SELECT * FROM memos WHERE content &@~ 'PGroonga OR PostgreSQL';
-- id | content
-- ----+----------------------------------------------------------------
-- 3 | PGroonga is a PostgreSQL extension that uses Groonga as index.
-- 1 | PostgreSQL is a relational database management system.
-- (2 rows)
SELECT * FROM memos WHERE content LIKE '%engine%';
-- id | content
-- ----+------------------------------------------------------------------------
-- 2 | Groonga is a fast full text search engine that supports all languages.
-- (1 row)