@@ -59,6 +59,9 @@ Typical installation procedure may look like this:
59
59
| timestamp < ; =| ; timestamp | float8 | Returns distance only for left timestamps.
60
60
| timestamp | ; => ; timestamp | float8 | Returns distance only for right timestamps.
61
61
62
+ Last three operations also works for types int2, int4, int8, float4, float8,
63
+ money and oid.
64
+
62
65
## Operator classes
63
66
64
67
** rum** provides next operator classes.
@@ -128,35 +131,33 @@ For type: `tsvector`
128
131
This operator class stores hash of ` tsvector ` lexemes with positional information.
129
132
Supports ordering by ` <=> ` operator. But ** doesn't** support prefix search.
130
133
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
138
135
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
140
139
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.
142
143
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.
146
146
147
- ### rum_tsvector_timestamp_ops
147
+ ### rum_tsvector_addon_ops
148
148
149
149
For type: ` tsvector `
150
150
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.
152
153
153
154
Let us assume we have the table:
154
155
``` sql
155
156
CREATE TABLE tsts (id int , t tsvector, d timestamp );
156
157
157
158
\copy tsts from ' rum/data/tsts.data'
158
159
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)
160
161
WITH (attach = ' d' , to = ' t' );
161
162
```
162
163
@@ -183,24 +184,13 @@ SELECT id, d, d <=> '2016-05-16 14:21:25' FROM tsts WHERE t @@ 'wr&qh' ORDER BY
183
184
(5 rows)
184
185
```
185
186
186
- ### rum_tsvector_timestamptz_ops
187
+ ### rum_tsvector_hash_addon_ops
187
188
188
189
For type: ` tsvector `
189
190
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.
202
193
203
- This operator class stores hash of ` tsvector ` lexems with timestamptz field.
204
194
** Doesn't** support prefix search.
205
195
206
196
### rum_tsquery_ops
0 commit comments