-
Notifications
You must be signed in to change notification settings - Fork 2
/
schema.py
29 lines (29 loc) · 922 Bytes
/
schema.py
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
schema = {
"index": {
"name": "book_index",
"prefix": "book",
"storage_type": "json",
},
"fields": [
{"name": "id", "type": "tag"},
{"name": "editions", "type": "tag", "path": "$.editions[*]"},
{"name": "genres", "type": "tag", "path": "$.genres[*]"},
{"name": "author", "type": "text"},
{"name": "description", "type": "text"},
{"name": "title", "type": "text"},
{"name": "pages", "type": "numeric"},
{"name": "year_published", "type": "numeric"},
{"name": "votes", "type": "numeric"},
{"name": "score", "type": "numeric"},
{
"name": "embedding",
"type": "vector",
"attrs": {
"dims": 384,
"distance_metric": "cosine",
"algorithm": "flat",
"datatype": "float32",
},
},
],
}