Skip to content

Commit 00d0b0d

Browse files
committed
conflict fix
1 parent 293cd4f commit 00d0b0d

File tree

1 file changed

+23
-24
lines changed

1 file changed

+23
-24
lines changed

conf/mapping.json

+23-24
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,13 @@
33
"index": {
44
"number_of_shards": 2,
55
"number_of_replicas": 0,
6-
"refresh_interval": "1000ms",
7-
"knn": true,
8-
"similarity": {
9-
"scripted_sim": {
10-
"type": "scripted",
11-
"script": {
12-
"source": "double idf = Math.log(1+(field.docCount-term.docFreq+0.5)/(term.docFreq + 0.5))/Math.log(1+((field.docCount-0.5)/1.5)); return query.boost * idf * Math.min(doc.freq, 1);"
13-
}
6+
"refresh_interval": "1000ms"
7+
},
8+
"similarity": {
9+
"scripted_sim": {
10+
"type": "scripted",
11+
"script": {
12+
"source": "double idf = Math.log(1+(field.docCount-term.docFreq+0.5)/(term.docFreq + 0.5))/Math.log(1+((field.docCount-0.5)/1.5)); return query.boost * idf * Math.min(doc.freq, 1);"
1413
}
1514
}
1615
}
@@ -157,46 +156,46 @@
157156
}
158157
},
159158
{
160-
"knn_vector": {
159+
"dense_vector": {
161160
"match": "*_512_vec",
162161
"mapping": {
163-
"type": "knn_vector",
162+
"type": "dense_vector",
164163
"index": true,
165-
"space_type": "cosinesimil",
166-
"dimension": 512
164+
"similarity": "cosine",
165+
"dims": 512
167166
}
168167
}
169168
},
170169
{
171-
"knn_vector": {
170+
"dense_vector": {
172171
"match": "*_768_vec",
173172
"mapping": {
174-
"type": "knn_vector",
173+
"type": "dense_vector",
175174
"index": true,
176-
"space_type": "cosinesimil",
177-
"dimension": 768
175+
"similarity": "cosine",
176+
"dims": 768
178177
}
179178
}
180179
},
181180
{
182-
"knn_vector": {
181+
"dense_vector": {
183182
"match": "*_1024_vec",
184183
"mapping": {
185-
"type": "knn_vector",
184+
"type": "dense_vector",
186185
"index": true,
187-
"space_type": "cosinesimil",
188-
"dimension": 1024
186+
"similarity": "cosine",
187+
"dims": 1024
189188
}
190189
}
191190
},
192191
{
193-
"knn_vector": {
192+
"dense_vector": {
194193
"match": "*_1536_vec",
195194
"mapping": {
196-
"type": "knn_vector",
195+
"type": "dense_vector",
197196
"index": true,
198-
"space_type": "cosinesimil",
199-
"dimension": 1536
197+
"similarity": "cosine",
198+
"dims": 1536
200199
}
201200
}
202201
},

0 commit comments

Comments
 (0)