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

Invalid request for vector_store.add_documents

Open varsha1288 opened this issue 10 months ago • 3 comments

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.

varsha1288 avatar Mar 25 '24 19:03 varsha1288

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

mattgotteiner avatar Apr 04 '24 14:04 mattgotteiner

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

mattgotteiner avatar Apr 05 '24 03:04 mattgotteiner

@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.

shayanshafquat avatar Aug 12 '24 01:08 shayanshafquat