Skip to content

Commit eb54d3b

Browse files
use exclude_vectors=False
1 parent 7106128 commit eb54d3b

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

elasticsearch/dsl/_async/document.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ def search(
129129
s = AsyncSearch[Self](
130130
using=cls._get_using(using), index=cls._default_index(index), doc_type=[cls]
131131
)
132-
return s.source(cls._get_field_names()) # type: ignore[arg-type]
132+
return s.source(exclude_vectors=False)
133133

134134
@classmethod
135135
async def get(

elasticsearch/dsl/_sync/document.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def search(
123123
s = Search[Self](
124124
using=cls._get_using(using), index=cls._default_index(index), doc_type=[cls]
125125
)
126-
return s.source(cls._get_field_names()) # type: ignore[arg-type]
126+
return s.source(exclude_vectors=False)
127127

128128
@classmethod
129129
def get(

elasticsearch/dsl/search_base.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -729,6 +729,9 @@ def ensure_strings(
729729
) -> Union[str, List[str], Dict[str, List[str]]]:
730730
if isinstance(fields, dict):
731731
return {k: ensure_strings(v) for k, v in fields.items()}
732+
elif isinstance(fields, bool):
733+
# boolean settings should stay the way they are
734+
return fields
732735
elif not isinstance(fields, (str, InstrumentedField)):
733736
# we assume that if `fields` is not a any of [dict, str,
734737
# InstrumentedField] then it is an iterable of strings or

0 commit comments

Comments
 (0)