Bug creating named vectors using REST Api

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

Hi @cameronmccord2

Thank you for the report! That is interesting. It may be a bug - I can confirm that I can reproduce it, and I don’t think that is intended behaviour.

I have passed it on to the team and we will get back to you shortly.

Best,
JP