Azure / azure-search-vector-samples

A repository of code samples for Vector search capabilities in Azure AI Search.
https://azure.microsoft.com/products/search
MIT License
739 stars 314 forks source link

Invalid request for vector_store.add_documents #216

Open varsha1288 opened 6 months ago

varsha1288 commented 6 months ago

HttpResponseError: () The request is invalid. Details: The property 'content' does not exist on type 'search.documentFields'. Make sure to only use property names that are defined by the type. Code: Message: The request is invalid. Details: The property 'content' does not exist on type 'search.documentFields'. Make sure to only use property names that are defined by the type.

vector_store.add_documents - this method runs into issues.

mattgotteiner commented 6 months ago

Thanks for the bug report - I'll try to fix this issue

mattgotteiner commented 5 months ago

I could not reproduce the issue. here's some things to check:

  1. did your index already exist? try deleting it and recreating it using the sample code
  2. langchain allows overriding what the content field is called

https://github.com/langchain-ai/langchain/blob/ebd24bb5d64078d7567eca4da0297260eb33dc31/libs/community/langchain_community/vectorstores/azuresearch.py#L48-L51

I recommend double checking that these environment variables are not accidentally set

shayanshafquat commented 1 month ago

@mattgotteiner Even I am facing the same issue when running this notebook. The mentioned environment variables are not set as I'm strictly following the readme and the setting the env variables that are listed there.