stef@carbonino:~$ defradb client collection add '
type Book11 {
title: String
plot: String @index(kind:ordered)
about_v: [Float32!] @index(vector: {dimensions: 3, hnsw: {metric: COSINE}}) @embedding(
fields: ["title", "plot"],
provider: "ollama",
model: "embeddinggemma"
)
}
'
[
{
"Name": "Book11",
...
"Indexes": [
{
"Name": "Book11_plot_ASC",
"ID": 1,
"Fields": [
{
"Name": "plot",
"Descending": false
}
],
"Kind": 0,
"KindDescription": {
"Unique": false
},
"Unique": false
},
{
"Name": "Book11_about_v_ASC",
"ID": 2,
"Fields": [
{
"Name": "about_v",
"Descending": false
}
],
"Kind": 1,
"KindDescription": {
"Algorithm": "HNSW",
"Metric": "COSINE",
"Dimensions": 3,
"HNSW": {
"M": 16,
"EfConstruction": 128,
"EfSearch": 64
}
},
"Unique": false
}
],
When creating or showing an index, the output for the
Kindfield is a numeric ID of the type. As we did for collection fields, it's a nice UX improvement to display the corresponding string value there.