-
Notifications
You must be signed in to change notification settings - Fork 189
/
Copy pathindex.json
51 lines (50 loc) · 1.32 KB
/
index.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
{% set p_include_non_serverless_index_settings = (include_non_serverless_index_settings | default(build_flavor != "serverless")) %}
{
"settings": {
{# non-serverless-index-settings-marker-start #}{%- if build_flavor != "serverless" or serverless_operator == true -%}
{% if p_include_non_serverless_index_settings %}
"index.number_of_shards": {{number_of_shards | default(2)}},
"index.number_of_replicas": {{number_of_replicas | default(0)}}
{% endif %}
{%- endif -%}{# non-serverless-index-settings-marker-end #}
},
"mappings": {
{%- if build_flavor != "serverless" -%}
"_source": {
"excludes": ["titleVector"]
},
{%- endif -%}
"properties": {
"userId": {
"type": "keyword"
},
"tags": {
"type": "keyword"
},
"questionId": {
"type": "keyword"
},
"creationDate": {
"type": "date"
},
"title": {
"type": "text"
},
"titleVector": {
"type": "dense_vector",
"dims" : 768,
"index" : true,
"similarity": "dot_product",
"index_options": {
"type": {{ vector_index_type | default("int8_hnsw") | tojson }}
}
},
"acceptedAnswerId": {
"type": "keyword"
},
"body": {
"type": "text"
}
}
}
}