rum
RUM index access method
Overview
| Package | Version | Category | License | Language |
|---|---|---|---|---|
rum | 1.3.15 | FEAT | PostgreSQL | C |
| ID | Extension | Bin | Lib | Load | Create | Trust | Reloc | Schema |
|---|---|---|---|---|---|---|---|---|
| 2710 | rum | No | Yes | No | Yes | No | Yes | - |
| Related | pg_search pgroonga pg_trgm pgfaceting roaringbitmap bloom parray_gin btree_gin intarray btree_gist |
|---|
1.3.15 build pass on pg 16,17,18
Version
| Type | Repo | Version | PG Ver | Package | Deps |
|---|---|---|---|---|---|
| EXT | MIXED | 1.3.15 | 1817161514 | rum | - |
| RPM | PIGSTY | 1.3.15 | 1817161514 | rum_$v | - |
| DEB | PGDG | 1.3.15 | 1817161514 | postgresql-$v-rum | - |
Build
You can build the RPM packages for rum using pig build:
Install
You can install rum directly. First, make sure the PGDG and PIGSTY repositories are added and enabled:
Install the extension using pig or apt/yum/dnf:
Install
pig
dnf
apt
Create Extension:
Usage
RUM is an index access method that extends GIN by storing additional information in the posting tree. This enables direct access to positional data, avoiding extra heap scans for ranking, phrase searches, and timestamp ordering.
Index Creation
With addon operators (e.g., ordering by a timestamp alongside full-text search):
Operator Classes
| Operator Class | Description |
|---|---|
rum_tsvector_ops | Stores tsvector lexemes with positions. Supports <=> ordering and prefix search. |
rum_tsvector_hash_ops | Stores hashed tsvector lexemes with positions. Supports <=> ordering, no prefix search. |
rum_tsvector_addon_ops | Combines tsvector with additional fields (timestamps, integers, etc.) for filtering and ordering. |
rum_tsvector_hash_addon_ops | Hashed variant supporting addon fields, no prefix search. |
rum_tsquery_ops | Stores tsquery branches for fast query matching against indexed documents. |
rum_anyarray_ops | Indexes array types. Supports &&, @>, <@, =, % and <=> ordering. |
rum_anyarray_addon_ops | Combines array elements with additional fields. |
rum_TYPE_ops | Generic ops for int2, int4, int8, float4, float8, money, oid, time, timetz, date, interval, macaddr, inet, cidr, text, varchar, char, bytea, bit, varbit, numeric, timestamp, timestamptz. |
Ordering Operators
| Operator | Description |
|---|---|
<=> | Distance operator for tsvector, timestamp, numeric types, arrays |
<=| | Left-side distance for timestamp, int, float, money, oid |
|=> | Right-side distance for timestamp, int, float, money, oid |
Examples
Full-text search with ranking:
Timestamp-ordered full-text search:
Array matching with distance ordering:
Was this page helpful?
Thanks—your feedback helps us improve this page.
What got in the way? (optional)