File tree Expand file tree Collapse file tree 2 files changed +2
-6
lines changed
elasticsearch/helpers/vectorstore Expand file tree Collapse file tree 2 files changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -83,10 +83,8 @@ def __init__(
8383 # client.options preserves existing (non-user-agent) headers.
8484 client = client .options (headers = {"User-Agent" : user_agent })
8585
86- if hasattr (retrieval_strategy , "text_field" ):
86+ if hasattr (retrieval_strategy , "text_field" ) and retrieval_strategy . text_field is None :
8787 retrieval_strategy .text_field = text_field
88- if hasattr (retrieval_strategy , "vector_field" ):
89- retrieval_strategy .vector_field = vector_field
9088
9189 self .client = client
9290 self .index = index
Original file line number Diff line number Diff line change @@ -80,10 +80,8 @@ def __init__(
8080 # client.options preserves existing (non-user-agent) headers.
8181 client = client .options (headers = {"User-Agent" : user_agent })
8282
83- if hasattr (retrieval_strategy , "text_field" ):
83+ if hasattr (retrieval_strategy , "text_field" ) and retrieval_strategy . text_field is None :
8484 retrieval_strategy .text_field = text_field
85- if hasattr (retrieval_strategy , "vector_field" ):
86- retrieval_strategy .vector_field = vector_field
8785
8886 self .client = client
8987 self .index = index
You can’t perform that action at this time.
0 commit comments