How to index vector fields for semantic search in sql server azure

Jarle Holt 0 Reputation points
2025-04-28T14:48:30.7966667+00:00

CREATE VECTOR INDEX idx_OpenAIEmbedding

ON dbo.table_name (OpenAIEmbedding)

WITH (

VECTOR_DIMENSION = 1536, -- Assuming OpenAI embedding dimension

SIMILARITY_FUNCTION = 'COSINE'

);

Started executing query at Line 1

Msg 343, Level 15, State 2, Line 1

Unknown object type 'VECTOR' used in a CREATE, DROP, or ALTER statement.

Msg 155, Level 15, State 1, Line 4

'VECTOR_DIMENSION' is not a recognized CREATE VECTOR INDEX option.

Msg 153, Level 15, State 1, Line 4

Invalid usage of the option VECTOR_DIMENSION in the INDEX statement.

Total execution time: 00:00:00.664

SQL Server Database Engine
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Olaf Helper 46,636 Reputation points
    2025-04-29T05:23:05.7666667+00:00

    Unknown object type 'VECTOR'

    As the message says, for SQL Database Engine on-premise/Azure there don't exists object type "VECTOR" jet, it's just in planing/preview.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.