Error 405 (method not allowed) while using Azure AI Search API
Dav
0
Reputation points
Hello,
I get the error 405 (method not allowed) while using the Azure AI Search API. I do not understand why.
I will explain what I want to do and the error I get. I do not have an extensive technical background so please excuse approximations if any.
- I created a vector database from which I can search successfully as seen below.
-
- I want to access this externally. So I plan to use the API single search vector (https://learn.microsoft.com/en-us/azure/search/search-get-started-vector?tabs=azure-cli#single-vector-search-with-filter). The API request is written as follows: (url and api key and vectors are not displayed here ) ### Run a vector query with a filter POST {{baseUrl}}/indexes/hotels-vector-quickstart/docs/search?api-version=2023-11-01 HTTP/1.1
}*Content-Type: application/json* *Authorization: Bearer {{token}}* *{* *"count": true,* *"select": "chunk,title,parent_id,@search.score,text_vector",* *"filter": "Tags/any(tag: tag eq 'free wifi')",* *"vectorFilterMode": "postFilter",* *"vectorQueries": [* *{* ***"vector": [ VECTOR OMITTED ],*** *"k": 7,* *"fields": "DescriptionVector",* *"kind": "vector",* *"exhaustive": true* *},* *]*
- One note: Insted of "Vector omitted" above I actually send the full vector coming from OpenAI that are the same size as the one used by AzureAI Search.
- As a result of this API Request I get this:
response: { headers: [HTTP/2 405,allow: GET,content-language: en,server: Microsoft-IIS/10.0,strict-transport-security: max-age=2592000,request-id: f20c21b8-fa0a-4bc3-a7fe-fa18f87919ef,elapsed-time: 9,strict-transport-security: max-age=15724800; includeSubDomains,date: Wed, 23 Oct 2024 20:03:26 GMT], result: , status: 405 }
Could you please help me finding what I do wrong? 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.
1,339 questions
Sign in to answer