@@ -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`
128131This operator class stores hash of ` tsvector ` lexemes with positional information.
129132Supports 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
149149For 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
153154Let us assume we have the table:
154155``` sql
155156CREATE 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
188189For 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