How do I upload a vector index document?

Seongsu Kim 41 Reputation points
2023-11-15T09:34:13.9133333+00:00

Hi. I'm speaking on a translator so please understand that this is a bit awkward.

I'm trying to do a vector index lookup on prompt flow, so I'm creating a vector index. (For your information, I've created a vector index on prompt flow, but it doesn't do data chunks as I want, so I'm making it myself.)

The index was created using the PUT method in https://{{my search service name}}.net/index/{{index name}}?api-version=2023-10-01-preview.

The next step is to upload documents using the POST method. The vector embedding was made into text-embedding-ada version 2 to create the following value data.

{

"value": [

    {

        "@search.action": "mergeOrUpload",

        "EleengId": "1",

        "EleengText": "a",

        "EleengTextVector": [

            0.004855279345065355,

            -0.014976955950260162,

            0.007678748108446598,

            ...

         ]

      }

      {...}

  ]

}

I POSTed these value values, and I get a 405 error.

I think this problem is caused by the vector index quota being 0bytes. Is that what you think?

If I'm right, let me know how to increase the vector index quota. I looked up the document but couldn't find it.

I referred to this link in general.
https://learn.microsoft.com/en-us/azure/search/search-get-started-vector


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.
1,340 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Grmacjon-MSFT 19,151 Reputation points Moderator
    2023-11-21T04:22:21.3566667+00:00

    Hello @Seongsu Kim

    Sorry to hear you're facing this issue.

    The 405 error you're encountering typically indicates that the HTTP method you are using (in this case, POST) is not allowed on the resource you are trying to access. It's not directly related to the vector index quota being 0 bytes.

    For Azure Cognitive Search, you don't explicitly set a quota for the vector index. Instead, you specify the size of the vectors in the index definition. Each vector field has a specified dimension, and the total size of the vector index is determined by the sum of the vector dimensions for all vector fields in the index.

    Here are a few things you might want to check:

    1. Index Definition: Make sure that your index definition includes the vector field with the correct dimension. For example:
    {
      "name": "your-index-name",
      "fields": [
        { "name": "EleengId", "type": "Edm.String", "key": true, "searchable": false },
        { "name": "EleengText", "type": "Edm.String", "searchable": true },
        { "name": "EleengTextVector", "type": "Collection(Edm.Double)", "facetable": false, "filterable": false, "sortable": false }
      ]
    }
    
    
    
    1. Dimension of Vector: Ensure that the dimension of the vector field matches the length of your vectors. In your case, it seems to be a vector of floating-point numbers.
    2. API Version: Double-check that you are using the correct API version. The link you provided uses "2023-10-01-preview."
    3. Authentication: Ensure that you have the necessary authentication to perform these operations.
    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.