You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+9-9Lines changed: 9 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -94,32 +94,32 @@ SET anyarray.similarity_type=jaccard;
94
94
SET anyarray.similarity_type=overlap;
95
95
```
96
96
97
-
Set threshold for similarity search. Default value is 0.6 . RESET value is 0.0 . anyarray.similarity_threshold accept values from 0.0 to 1e10 .
97
+
Set threshold for similarity search. Default value is 0.6 . RESET value is 0.0 . `anyarray.similarity_threshold` accept values from 0.0 to 1e10 .
98
98
```
99
99
SET anyarray.similarity_threshold = 3;
100
100
RESET anyarray.similarity_threshold;
101
101
```
102
102
103
-
RUM version 1.2 and 1.3 used variables rum.array_similarity_function and rum.array_similarity_threshold that are obsolete and replaced by anyarray.similarity_type and anyarray.similarity_threshold.
103
+
RUM version 1.2 and 1.3 used variables `rum.array_similarity_function` and `rum.array_similarity_threshold` that are obsolete and replaced by `anyarray.similarity_type` and `anyarray.similarity_threshold`.
104
104
105
105
Examples
106
106
-------
107
107
108
108
Examples for INTEGER[] .
109
109
110
110
### Create a table with sample data.
111
-
```
111
+
```SQL
112
112
SELECT t, ARRAY(
113
113
SELECT v::int4
114
-
FROM generate_series(max(0, t - 10), t) as v
114
+
FROM generate_series(GREATEST(0, t -10), t) as v
115
115
) AS v
116
116
INTO test_int4
117
117
FROM generate_series(1, 200) as t;
118
118
```
119
119
120
120
### Similarity calculation.
121
121
122
-
```
122
+
```SQL
123
123
SETanyarray.similarity_type=cosine;
124
124
SELECT t, similarity(v, '{10,9,8,7,6,5,4,3,2,1}') AS s FROM test_int4
125
125
WHERE v % '{10,9,8,7,6,5,4,3,2,1}'ORDER BY s DESC, t;
0 commit comments