Skip to content

Commit 0ba94fc

Browse files
committed
docs about new features
1 parent 22a0840 commit 0ba94fc

File tree

1 file changed

+19
-29
lines changed

1 file changed

+19
-29
lines changed

README.md

+19-29
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ Typical installation procedure may look like this:
5959
| timestamp <=| timestamp | float8 | Returns distance only for left timestamps.
6060
| timestamp |=> timestamp | float8 | Returns distance only for right timestamps.
6161

62+
Last three operations also works for types int2, int4, int8, float4, float8,
63+
money and oid.
64+
6265
## Operator classes
6366

6467
**rum** provides next operator classes.
@@ -128,35 +131,33 @@ For type: `tsvector`
128131
This operator class stores hash of `tsvector` lexemes with positional information.
129132
Supports ordering by `<=>` operator. But **doesn't** support prefix search.
130133

131-
### rum_timestamp_ops
132-
133-
For type: `timestamp`
134-
135-
Operator class provides fast search and ordering by timestamp fields. Supports
136-
ordering by `<=>`, `<=|` and `|=>` operators. Can be used with
137-
`rum_tsvector_timestamp_ops` operator class.
134+
### rum_TYPE_ops
138135

139-
### rum_timestamptz_ops
136+
For types: int2, int4, int8, float4, float8, money, oid, time, timetz, date,
137+
interval, macaddr, inet, cidr, text, varchar, char, bytea, bit, varbit,
138+
numeric, timestamp, timestamptz
140139

141-
For type: `timestamptz`
140+
Supported operations: `<`, `<=`, `=`, `>=`, `>` for all types and
141+
`<=>`, `<=|` and `|=>` for int2, int4, int8, float4, float8, money, oid,
142+
timestamp and timestamptz types.
142143

143-
Operator class provides fast search and ordering by timestamptz fields. Supports
144-
ordering by `<=>`, `<=|` and `|=>` operators. Can be used with
145-
`rum_tsvector_timestamptz_ops` operator class.
144+
Supports ordering by `<=>`, `<=|` and `|=>` operators. Can be used with
145+
`rum_tsvector_addon_ops` operator class.
146146

147-
### rum_tsvector_timestamp_ops
147+
### rum_tsvector_addon_ops
148148

149149
For type: `tsvector`
150150

151-
This operator class stores `tsvector` lexems with timestamp field. There is the example.
151+
This operator class stores `tsvector` lexems with any supported by module
152+
field. There is the example.
152153

153154
Let us assume we have the table:
154155
```sql
155156
CREATE TABLE tsts (id int, t tsvector, d timestamp);
156157

157158
\copy tsts from 'rum/data/tsts.data'
158159

159-
CREATE INDEX tsts_idx ON tsts USING rum (t rum_tsvector_timestamp_ops, d)
160+
CREATE INDEX tsts_idx ON tsts USING rum (t rum_tsvector_addon_ops, d)
160161
WITH (attach = 'd', to = 't');
161162
```
162163

@@ -183,24 +184,13 @@ SELECT id, d, d <=> '2016-05-16 14:21:25' FROM tsts WHERE t @@ 'wr&qh' ORDER BY
183184
(5 rows)
184185
```
185186

186-
### rum_tsvector_timestamptz_ops
187+
### rum_tsvector_hash_addon_ops
187188

188189
For type: `tsvector`
189190

190-
See comments for `rum_tsvector_timestamp_ops` operator class.
191-
192-
### rum_tsvector_hash_timestamp_ops
193-
194-
For type: `tsvector`
195-
196-
This operator class stores hash of `tsvector` lexems with timestamp field.
197-
**Doesn't** support prefix search.
198-
199-
### rum_tsvector_hash_timestamptz_ops
200-
201-
For type: `tsvector`
191+
This operator class stores hash of `tsvector` lexems with any supported by module
192+
field.
202193

203-
This operator class stores hash of `tsvector` lexems with timestamptz field.
204194
**Doesn't** support prefix search.
205195

206196
### rum_tsquery_ops

0 commit comments

Comments
 (0)