stargate / data-api

JSON document API for Apache Cassandra (formerly known as JSON API)
https://stargate.io
Apache License 2.0
14 stars 16 forks source link

createVectorIndex has unwanted restrictions on the source model name #1674

Open amorton opened 1 week ago

amorton commented 1 week ago

This is on the options for create index

      @Nullable
          @Size(min = 1, max = 48)
          @Pattern(regexp = "[a-zA-Z][a-zA-Z0-9_]*")
          @Schema(description = "Model name used to generate the embeddings.")
          @JsonInclude(JsonInclude.Include.NON_NULL)
          String sourceModel) {}

Why does it limit the characters and the length ?

it looks like this has been copy - pasted into many places:

        @Size(min = 1, max = 48)
        @Pattern(regexp = "[a-zA-Z][a-zA-Z0-9_]*")

This ticket should also check all the places this is present to see if it should be there.