azure-search-vector-samples icon indicating copy to clipboard operation
azure-search-vector-samples copied to clipboard

Cannot find nested property 'contentVector' on the resource type 'Microsoft.Azure.Search.V2023_07_01_Preview.Vector'."

Open methodidacte opened this issue 2 years ago • 3 comments

Hello,

following the quick start vector search, everything is fine until the search on the contentVector field. From the UI in Azure Portal, I see that contentVector field is OK.

Then I try a POST request from Postman like this : https://.search.windows.net/indexes//docs/search?api-version=2023-07-01-Preview with a body similar to the documentation.

Finally, I get this 400 error :

"The request is invalid. Details: Cannot find nested property 'contentVector' on the resource type 'Microsoft.Azure.Search.V2023_07_01_Preview.Vector'."

Switching to "fields": "titleVector" in the body gives me the same issue, including the reference to nested property 'contentVector' .

methodidacte avatar Jul 03 '23 21:07 methodidacte

Couple things I noticed:

  1. Can you modify your endpoint https://{{search-service-name}}.search.windows.net/indexes/{{index-name}}docs/search?api-version=2023-07-01-Preview instead of https://.search.windows.net/indexes//docs/search?api-version=2023-07-01-Preview
  2. Can you verify that your index definition has the field contentVector and is of type Collection(Edm.Single). Additionally please verify that it has a dimensions property and a vectorSearchConfiguration property?

Do you mind posting what your request body looks like?

farzad528 avatar Jul 04 '23 10:07 farzad528

The endpoint is https://xxxxxx.search.windows.net/indexes/yyyyy/docs/search?api-version=2023-07-01-Preview with xxxxx the Cognitive Search name and yyyyy the index name.

Here is how I define the contentVector : { "name": "contentVector", "type": "Collection(Edm.Single)", "searchable": true, "retrievable": true, "dimensions": 1536, "vectorSearchConfiguration": "vectorConfig" } I see the contentVector field on the fields view in the Azure portal but without any type or any checkbox (retrievable, searchable...).

Here is the JSON body : { "vector": { "value": [-0.010636103339493275, ..., -0.0011531909694895148, -0.012766171246767044, -0.004354660864919424], "fields": "contentVector", "k": 5 }, "select": "title, content, category" }

methodidacte avatar Jul 05 '23 05:07 methodidacte

Hi, since this feature is in private preview, it's only available via the REST API for now. Once we go public you'll have vector search field support in the Portal.

Everything seems correct, can I request you to submit a support ticket so we can dive into this error?

farzad528 avatar Jul 05 '23 09:07 farzad528