Azure AI Search - Vector field not retrievable in results via Python code

Clodagh Lynch 50 Reputation points Microsoft Employee
2024-05-13T16:38:33.07+00:00

The vector query field of my Azure AI Search index, named 'vector', is not returning in search results. I have figured out it is because the field is not 'retrievable'.

I am able to make it retrievable manually via the Azure portal. However, I am unable to do so via Python code.

I have set the retrievable parameter to True on this line:

SearchField(name="vector", type=SearchFieldDataType.Collection(SearchFieldDataType.Single), retrievable=True, vector_search_dimensions=1536, vector_search_profile_name=""),  

Has anyone solved this problem?

Thank you!

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.
757 questions
0 comments No comments
{count} votes

Accepted answer
  1. SnehaAgrawal-MSFT 18,871 Reputation points
    2024-05-15T14:25:01.6366667+00:00

    @Clodagh Lynch Thanks for asking question! You may want to know that the new API version (2024-03-01-Preview) has changed the default value for retrievable to false.

    To make it retrievable in the python SDK, you need to specify "hidden=False" on the search field.

    0 comments No comments

0 additional answers

Sort by: Most helpful