@@ -61,14 +61,14 @@ Typical installation procedure may look like this:
61
61
62
62
##Operator classes
63
63
64
- ** rum** provides next operator classes
64
+ ** rum** provides next operator classes.
65
65
66
66
###rum_tsvector_ops
67
67
68
68
For type:` tsvector `
69
69
70
70
This operator class stores` tsvector ` lexemes with positional information. Supports
71
- ordering by` <=> ` operator and prefix search. There is the example.
71
+ ordering by` <=> ` operator and prefix search. There is the example.
72
72
73
73
Let us assume we have the table:
74
74
@@ -99,7 +99,7 @@ CREATE INDEX rumidx ON test_rum USING rum (a rum_tsvector_ops);
99
99
And we can execute the following queries:
100
100
101
101
``` sql
102
- = # SELECT t, a <=> to_tsquery('english', 'beautiful | place') AS rank
102
+ SELECT t, a<=> to_tsquery(' english' ,' beautiful | place' )AS rank
103
103
FROM test_rum
104
104
WHERE a @@ to_tsquery(' english' ,' beautiful | place' )
105
105
ORDER BY a<=> to_tsquery(' english' ,' beautiful | place' );
@@ -110,7 +110,7 @@ And we can execute the following queries:
110
110
It lookslike a beautiful place |0 .0607927
111
111
(3 rows)
112
112
113
- = # SELECT t, a <=> to_tsquery('english', 'place | situation') AS rank
113
+ SELECT t, a<=> to_tsquery(' english' ,' place | situation' )AS rank
114
114
FROM test_rum
115
115
WHERE a @@ to_tsquery(' english' ,' place | situation' )
116
116
ORDER BY a<=> to_tsquery(' english' ,' place | situation' );
@@ -126,29 +126,29 @@ And we can execute the following queries:
126
126
For type:` tsvector `
127
127
128
128
This operator class stores hash of` tsvector ` lexemes with positional information.
129
- Supports ordering by` <=> ` operator. But** doesn't** support prefix search.
129
+ Supports ordering by` <=> ` operator. But** doesn't** support prefix search.
130
130
131
131
###rum_timestamp_ops
132
132
133
133
For type:` timestamp `
134
134
135
135
Operator class provides fast search and ordering by timestamp fields. Supports
136
- ordering by` <=> ` ,` <=| ` and` |=> ` operators. Can be used
137
- with ` rum_tsvector_timestamp_ops ` operator class.
136
+ ordering by` <=> ` ,` <=| ` and` |=> ` operators. Can be used with
137
+ ` rum_tsvector_timestamp_ops ` operator class.
138
138
139
139
###rum_timestamptz_ops
140
140
141
141
For type:` timestamptz `
142
142
143
143
Operator class provides fast search and ordering by timestamptz fields. Supports
144
- ordering by` <=> ` ,` <=| ` and` |=> ` operators. Can be used
145
- with ` rum_tsvector_timestamptz_ops ` operator class.
144
+ ordering by` <=> ` ,` <=| ` and` |=> ` operators. Can be used with
145
+ ` rum_tsvector_timestamptz_ops ` operator class.
146
146
147
147
###rum_tsvector_timestamp_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 timestamp field. There is the example.
152
152
153
153
Let us assume we have the table:
154
154
``` sql
@@ -163,7 +163,7 @@ CREATE INDEX tsts_idx ON tsts USING rum (t rum_tsvector_timestamp_ops, d)
163
163
Now we can execute the following queries:
164
164
``` sql
165
165
EXPLAIN (costs off)
166
- SELECT id, d, d<=> ' 2016-05-16 14:21:25' FROM tstsWHERE t @@' wr&qh' ORDER BY d<=> ' 2016-05-16 14:21:25' LIMIT 5 ;
166
+ SELECT id, d, d<=> ' 2016-05-16 14:21:25' FROM tstsWHERE t @@' wr&qh' ORDER BY d<=> ' 2016-05-16 14:21:25' LIMIT 5 ;
167
167
QUERY PLAN
168
168
-- ---------------------------------------------------------------------------------
169
169
Limit
@@ -223,7 +223,7 @@ CREATE INDEX query_idx ON query USING rum(q);
223
223
Now we can execute the following fast query:
224
224
``` sql
225
225
SELECT * FROM query
226
- WHERE to_tsvector(' black holes never exists before we think about them' ) @@ q;
226
+ WHERE to_tsvector(' black holes never exists before we think about them' ) @@ q;
227
227
q | tag
228
228
-- ----------------+-------
229
229
' black' | color