Found a bug when creating a schema with a named vector using the REST api.
Bug:
The documentation indicates that “vectorIndexType” defaults to “hnsw” but the creation fails if that key and value aren’t explicitly specified. See Body Parameters → objectClass → vectorConfig → <vector_name> → vectorIndexType at Weaviate - Vector Database
Expected result: the collection schema gets created without having to specify vectorIndexType
Actual result: JSON error
[{"error":[{"message":"target vector \"text\": unrecognized or unsupported vectorIndexType \"\""}]}]
Failing input:
{
"class": "Question",
"description": "Table index for the Question collection",
"moduleConfig": {
"text2vec-ollama": {
"apiEndpoint": "http://host.docker.internal:11434",
"model": "mxbai-embed-large",
"vectorizeClassName": false
}
},
"properties": [
{
"dataType": [
"text"
],
"description": "The text column",
"name": "text",
"indexFilterable": false,
"indexSearchable": false
},
{
"dataType": [
"text"
],
"description": "Our uid of the record in mysql",
"indexFilterable": true,
"indexSearchable": false,
"name": "uid"
}
],
"vectorConfig": {
"text": {
"vectorizer": {
"text2vec-ollama": {
"properties": [
"text"
]
}
}
}
}
}
Working input: (only change is the addition of the key vectorConfig.text.vectorIndexType
{
"class": "Question",
"description": "Table index for the Question collection",
"moduleConfig": {
"text2vec-ollama": {
"apiEndpoint": "http://host.docker.internal:11434",
"model": "mxbai-embed-large",
"vectorizeClassName": false
}
},
"properties": [
{
"dataType": [
"text"
],
"description": "The text column",
"name": "text",
"indexFilterable": false,
"indexSearchable": false
},
{
"dataType": [
"text"
],
"description": "Our uid of the record in mysql",
"indexFilterable": true,
"indexSearchable": false,
"name": "uid"
}
],
"vectorConfig": {
"text": {
"vectorIndexType": "hnsw",
"vectorizer": {
"text2vec-ollama": {
"properties": [
"text"
]
}
}
}
}
}
We’re using Weaviate via Docker cr.weaviate.io/semitechnologies/weaviate:1.25.4
We’re using weaviate-ruby but its a light wrapper that passes this json through to your REST Api
The product works great! Thanks