How to Configure 'vectorSearchConfiguration' for a SearchField Field called contentVector

Anonymous
2023-10-18T01:05:19.4733333+00:00
 

I'm defining an index with multiple fields, including a "contentVector" field for vector data. However, I'm encountering a specific error, and I'm not sure how to correctly set the "vectorSearchConfiguration" property for the "contentVector" field.

I've tried to configure the "vectorSearchConfiguration" property, but I'm unsure of the correct way to do it. Can someone please guide me on how to properly set the "vectorSearchConfiguration" for the "contentVector" field?

Code snippet and the error-

SearchField(name="contentVector", type=SearchFieldDataType.Collection(SearchFieldDataType.Single),
                searchable=True, vector_search_dimensions=1536,
                vector_search_configuration='my-vector-config')
raise HttpResponseError(response=response, model=error) azure.core.exceptions.HttpResponseError: (InvalidRequestParameter) The request is invalid. Details: definition : The vector field 'contentVector' must have the property 'vectorSearchConfiguration' set. Code: InvalidRequestParameter Message: The request is invalid. Details: definition : The vector field 'contentVector' must have the property 'vectorSearchConfiguration' set. Exception Details:	(InvalidField) The vector field 'contentVector' must have the property 'vectorSearchConfiguration' set. Parameters: definition 	Code: InvalidField 	Message: The vector field 'contentVector' must have the property 'vectorSearchConfiguration' set. Parameters: definition
azure.core.exceptions.HttpResponseError: (InvalidRequestParameter) The request is invalid. Details: definition : The vector field 'contentVector' must have the property 'vectorSearchConfiguration' set.
Code: InvalidRequestParameter
Message: The request is invalid. Details: definition : The vector field 'contentVector' must have the property 'vectorSearchConfiguration' set.
Exception Details:	(InvalidField) The vector field 'contentVector' must have the property 'vectorSearchConfiguration' set. Parameters: definition
	Code: InvalidField
	Message: The vector field 'contentVector' must have the property 'vectorSearchConfiguration' set. Parameters: definition
Azure AI Search
Azure AI Search
An Azure search service with built-in artificial intelligence capabilities that enrich information to help identify and explore relevant content at scale.
764 questions
Azure OpenAI Service
Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
2,328 questions
{count} votes

Accepted answer
  1. ajkuma 22,936 Reputation points Microsoft Employee
    2023-10-18T19:00:08.3866667+00:00

    @Anonymous ,

    Thanks for posting this question. Based on the issue description, I understand you have already tried setting the property.

    Under your "contentVector" field, ensure that you are defining that you will be using it. Take a look at the sample vectors js.

    Also, ensure vectorSearchConfiguration" is not null.

    Example: "vectorSearchConfiguration":"default-test",

    change vectorSearchConfiguration": null ---> vectorSearchConfiguration": "default-test”

    Kindly let us know, I'll follow-up with you further.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful