elasticsearch 8.19.2__py3-none-any.whl → 8.19.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. elasticsearch/_async/client/__init__.py +39 -18
  2. elasticsearch/_async/client/async_search.py +3 -3
  3. elasticsearch/_async/client/autoscaling.py +8 -4
  4. elasticsearch/_async/client/cat.py +40 -2
  5. elasticsearch/_async/client/ccr.py +2 -2
  6. elasticsearch/_async/client/cluster.py +10 -9
  7. elasticsearch/_async/client/connector.py +34 -33
  8. elasticsearch/_async/client/dangling_indices.py +6 -10
  9. elasticsearch/_async/client/eql.py +2 -2
  10. elasticsearch/_async/client/esql.py +1 -1
  11. elasticsearch/_async/client/features.py +2 -2
  12. elasticsearch/_async/client/fleet.py +3 -3
  13. elasticsearch/_async/client/indices.py +235 -25
  14. elasticsearch/_async/client/ingest.py +1 -1
  15. elasticsearch/_async/client/license.py +3 -5
  16. elasticsearch/_async/client/ml.py +61 -21
  17. elasticsearch/_async/client/monitoring.py +2 -1
  18. elasticsearch/_async/client/nodes.py +7 -7
  19. elasticsearch/_async/client/rollup.py +9 -9
  20. elasticsearch/_async/client/search_application.py +11 -11
  21. elasticsearch/_async/client/searchable_snapshots.py +4 -4
  22. elasticsearch/_async/client/security.py +4 -4
  23. elasticsearch/_async/client/shutdown.py +7 -2
  24. elasticsearch/_async/client/simulate.py +2 -2
  25. elasticsearch/_async/client/slm.py +1 -1
  26. elasticsearch/_async/client/snapshot.py +3 -2
  27. elasticsearch/_async/client/streams.py +6 -6
  28. elasticsearch/_async/client/tasks.py +4 -4
  29. elasticsearch/_async/client/text_structure.py +5 -1
  30. elasticsearch/_async/client/transform.py +37 -0
  31. elasticsearch/_async/client/utils.py +4 -2
  32. elasticsearch/_async/client/watcher.py +2 -2
  33. elasticsearch/_async/client/xpack.py +2 -1
  34. elasticsearch/_sync/client/__init__.py +41 -18
  35. elasticsearch/_sync/client/async_search.py +3 -3
  36. elasticsearch/_sync/client/autoscaling.py +8 -4
  37. elasticsearch/_sync/client/cat.py +40 -2
  38. elasticsearch/_sync/client/ccr.py +2 -2
  39. elasticsearch/_sync/client/cluster.py +10 -9
  40. elasticsearch/_sync/client/connector.py +34 -33
  41. elasticsearch/_sync/client/dangling_indices.py +6 -10
  42. elasticsearch/_sync/client/eql.py +2 -2
  43. elasticsearch/_sync/client/esql.py +1 -1
  44. elasticsearch/_sync/client/features.py +2 -2
  45. elasticsearch/_sync/client/fleet.py +3 -3
  46. elasticsearch/_sync/client/indices.py +235 -25
  47. elasticsearch/_sync/client/ingest.py +1 -1
  48. elasticsearch/_sync/client/license.py +3 -5
  49. elasticsearch/_sync/client/ml.py +61 -21
  50. elasticsearch/_sync/client/monitoring.py +2 -1
  51. elasticsearch/_sync/client/nodes.py +7 -7
  52. elasticsearch/_sync/client/rollup.py +9 -9
  53. elasticsearch/_sync/client/search_application.py +11 -11
  54. elasticsearch/_sync/client/searchable_snapshots.py +4 -4
  55. elasticsearch/_sync/client/security.py +4 -4
  56. elasticsearch/_sync/client/shutdown.py +7 -2
  57. elasticsearch/_sync/client/simulate.py +2 -2
  58. elasticsearch/_sync/client/slm.py +1 -1
  59. elasticsearch/_sync/client/snapshot.py +3 -2
  60. elasticsearch/_sync/client/streams.py +6 -6
  61. elasticsearch/_sync/client/tasks.py +4 -4
  62. elasticsearch/_sync/client/text_structure.py +5 -1
  63. elasticsearch/_sync/client/transform.py +37 -0
  64. elasticsearch/_sync/client/utils.py +16 -2
  65. elasticsearch/_sync/client/watcher.py +2 -2
  66. elasticsearch/_sync/client/xpack.py +2 -1
  67. elasticsearch/_version.py +2 -2
  68. elasticsearch/dsl/_async/document.py +4 -5
  69. elasticsearch/dsl/_async/index.py +1 -1
  70. elasticsearch/dsl/_async/search.py +2 -3
  71. elasticsearch/dsl/_sync/document.py +4 -5
  72. elasticsearch/dsl/_sync/index.py +1 -1
  73. elasticsearch/dsl/_sync/search.py +2 -3
  74. elasticsearch/dsl/aggs.py +7 -7
  75. elasticsearch/dsl/async_connections.py +1 -2
  76. elasticsearch/dsl/connections.py +1 -2
  77. elasticsearch/dsl/document_base.py +1 -1
  78. elasticsearch/dsl/query.py +23 -0
  79. elasticsearch/dsl/serializer.py +1 -2
  80. elasticsearch/dsl/types.py +2 -0
  81. elasticsearch/dsl/utils.py +1 -2
  82. elasticsearch/esql/esql.py +1 -1
  83. elasticsearch/esql/functions.py +2 -2
  84. elasticsearch/helpers/vectorstore/__init__.py +7 -7
  85. elasticsearch/helpers/vectorstore/_async/_utils.py +1 -1
  86. elasticsearch/helpers/vectorstore/_async/embedding_service.py +2 -2
  87. elasticsearch/helpers/vectorstore/_async/strategies.py +3 -3
  88. elasticsearch/helpers/vectorstore/_async/vectorstore.py +5 -5
  89. elasticsearch/helpers/vectorstore/_sync/_utils.py +1 -1
  90. elasticsearch/helpers/vectorstore/_sync/embedding_service.py +2 -2
  91. elasticsearch/helpers/vectorstore/_sync/strategies.py +3 -3
  92. elasticsearch/helpers/vectorstore/_sync/vectorstore.py +5 -5
  93. {elasticsearch-8.19.2.dist-info → elasticsearch-8.19.3.dist-info}/METADATA +1 -1
  94. elasticsearch-8.19.3.dist-info/RECORD +166 -0
  95. {elasticsearch-8.19.2.dist-info → elasticsearch-8.19.3.dist-info}/WHEEL +1 -1
  96. elasticsearch-8.19.2.dist-info/RECORD +0 -166
  97. {elasticsearch-8.19.2.dist-info → elasticsearch-8.19.3.dist-info}/licenses/LICENSE +0 -0
  98. {elasticsearch-8.19.2.dist-info → elasticsearch-8.19.3.dist-info}/licenses/NOTICE +0 -0
@@ -31,9 +31,8 @@ from typing import (
31
31
 
32
32
  from typing_extensions import Self, dataclass_transform
33
33
 
34
- from elasticsearch.exceptions import NotFoundError, RequestError
35
- from elasticsearch.helpers import bulk
36
-
34
+ from ...exceptions import NotFoundError, RequestError
35
+ from ...helpers import bulk
37
36
  from .._sync.index import Index
38
37
  from ..connections import get_connection
39
38
  from ..document_base import DocumentBase, DocumentMeta, mapped_field
@@ -42,8 +41,8 @@ from ..utils import DOC_META_FIELDS, META_FIELDS, UsingType, merge
42
41
  from .search import Search
43
42
 
44
43
  if TYPE_CHECKING:
45
- from elasticsearch import Elasticsearch
46
- from elasticsearch.esql.esql import ESQLBase
44
+ from ... import Elasticsearch
45
+ from ...esql.esql import ESQLBase
47
46
 
48
47
 
49
48
  class IndexMeta(DocumentMeta):
@@ -30,7 +30,7 @@ from .update_by_query import UpdateByQuery
30
30
  if TYPE_CHECKING:
31
31
  from elastic_transport import ObjectApiResponse
32
32
 
33
- from elasticsearch import Elasticsearch
33
+ from ... import Elasticsearch
34
34
 
35
35
 
36
36
  class IndexTemplate:
@@ -28,9 +28,8 @@ from typing import (
28
28
 
29
29
  from typing_extensions import Self
30
30
 
31
- from elasticsearch.exceptions import ApiError
32
- from elasticsearch.helpers import scan
33
-
31
+ from ...exceptions import ApiError
32
+ from ...helpers import scan
34
33
  from ..connections import get_connection
35
34
  from ..response import Response
36
35
  from ..search_base import MultiSearchBase, SearchBase
elasticsearch/dsl/aggs.py CHANGED
@@ -1513,9 +1513,9 @@ class GeoLine(Agg[_R]):
1513
1513
  ordered by the chosen sort field.
1514
1514
 
1515
1515
  :arg point: (required) The name of the geo_point field.
1516
- :arg sort: (required) The name of the numeric field to use as the sort
1517
- key for ordering the points. When the `geo_line` aggregation is
1518
- nested inside a `time_series` aggregation, this field defaults to
1516
+ :arg sort: The name of the numeric field to use as the sort key for
1517
+ ordering the points. When the `geo_line` aggregation is nested
1518
+ inside a `time_series` aggregation, this field defaults to
1519
1519
  `@timestamp`, and any other value will result in error.
1520
1520
  :arg include_sort: When `true`, returns an additional array of the
1521
1521
  sort values in the feature properties.
@@ -1852,9 +1852,9 @@ class Inference(Pipeline[_R]):
1852
1852
  class Line(Agg[_R]):
1853
1853
  """
1854
1854
  :arg point: (required) The name of the geo_point field.
1855
- :arg sort: (required) The name of the numeric field to use as the sort
1856
- key for ordering the points. When the `geo_line` aggregation is
1857
- nested inside a `time_series` aggregation, this field defaults to
1855
+ :arg sort: The name of the numeric field to use as the sort key for
1856
+ ordering the points. When the `geo_line` aggregation is nested
1857
+ inside a `time_series` aggregation, this field defaults to
1858
1858
  `@timestamp`, and any other value will result in error.
1859
1859
  :arg include_sort: When `true`, returns an additional array of the
1860
1860
  sort values in the feature properties.
@@ -2677,7 +2677,7 @@ class Percentiles(Agg[_R]):
2677
2677
  self,
2678
2678
  *,
2679
2679
  keyed: Union[bool, "DefaultType"] = DEFAULT,
2680
- percents: Union[Sequence[float], "DefaultType"] = DEFAULT,
2680
+ percents: Union[float, Sequence[float], "DefaultType"] = DEFAULT,
2681
2681
  hdr: Union["types.HdrMethod", Dict[str, Any], "DefaultType"] = DEFAULT,
2682
2682
  tdigest: Union["types.TDigest", Dict[str, Any], "DefaultType"] = DEFAULT,
2683
2683
  format: Union[str, "DefaultType"] = DEFAULT,
@@ -17,8 +17,7 @@
17
17
 
18
18
  from typing import Type
19
19
 
20
- from elasticsearch import AsyncElasticsearch
21
-
20
+ from .. import AsyncElasticsearch
22
21
  from .connections import Connections
23
22
 
24
23
 
@@ -17,8 +17,7 @@
17
17
 
18
18
  from typing import Any, Dict, Generic, Type, TypeVar, Union
19
19
 
20
- from elasticsearch import Elasticsearch, __versionstr__
21
-
20
+ from .. import Elasticsearch, __versionstr__
22
21
  from .serializer import serializer
23
22
 
24
23
  _T = TypeVar("_T")
@@ -38,7 +38,7 @@ from typing import (
38
38
  try:
39
39
  import annotationlib
40
40
  except ImportError:
41
- annotationlib = None
41
+ annotationlib = None # type: ignore[assignment]
42
42
 
43
43
  try:
44
44
  from types import UnionType
@@ -370,6 +370,7 @@ class Common(Query):
370
370
  _value: Union[
371
371
  "types.CommonTermsQuery", Dict[str, Any], "DefaultType"
372
372
  ] = DEFAULT,
373
+ /,
373
374
  **kwargs: Any,
374
375
  ):
375
376
  if _field is not DEFAULT:
@@ -666,6 +667,7 @@ class Fuzzy(Query):
666
667
  self,
667
668
  _field: Union[str, "InstrumentedField", "DefaultType"] = DEFAULT,
668
669
  _value: Union["types.FuzzyQuery", Dict[str, Any], "DefaultType"] = DEFAULT,
670
+ /,
669
671
  **kwargs: Any,
670
672
  ):
671
673
  if _field is not DEFAULT:
@@ -708,6 +710,7 @@ class GeoBoundingBox(Query):
708
710
  Dict[str, Any],
709
711
  "DefaultType",
710
712
  ] = DEFAULT,
713
+ /,
711
714
  *,
712
715
  type: Union[Literal["memory", "indexed"], "DefaultType"] = DEFAULT,
713
716
  validation_method: Union[
@@ -771,6 +774,7 @@ class GeoDistance(Query):
771
774
  Dict[str, Any],
772
775
  "DefaultType",
773
776
  ] = DEFAULT,
777
+ /,
774
778
  *,
775
779
  distance: Union[str, "DefaultType"] = DEFAULT,
776
780
  distance_type: Union[Literal["arc", "plane"], "DefaultType"] = DEFAULT,
@@ -810,6 +814,7 @@ class GeoGrid(Query):
810
814
  self,
811
815
  _field: Union[str, "InstrumentedField", "DefaultType"] = DEFAULT,
812
816
  _value: Union["types.GeoGridQuery", Dict[str, Any], "DefaultType"] = DEFAULT,
817
+ /,
813
818
  **kwargs: Any,
814
819
  ):
815
820
  if _field is not DEFAULT:
@@ -839,6 +844,7 @@ class GeoPolygon(Query):
839
844
  _value: Union[
840
845
  "types.GeoPolygonPoints", Dict[str, Any], "DefaultType"
841
846
  ] = DEFAULT,
847
+ /,
842
848
  *,
843
849
  validation_method: Union[
844
850
  Literal["coerce", "ignore_malformed", "strict"], "DefaultType"
@@ -885,6 +891,7 @@ class GeoShape(Query):
885
891
  _value: Union[
886
892
  "types.GeoShapeFieldQuery", Dict[str, Any], "DefaultType"
887
893
  ] = DEFAULT,
894
+ /,
888
895
  *,
889
896
  ignore_unmapped: Union[bool, "DefaultType"] = DEFAULT,
890
897
  boost: Union[float, "DefaultType"] = DEFAULT,
@@ -1060,6 +1067,7 @@ class Intervals(Query):
1060
1067
  self,
1061
1068
  _field: Union[str, "InstrumentedField", "DefaultType"] = DEFAULT,
1062
1069
  _value: Union["types.IntervalsQuery", Dict[str, Any], "DefaultType"] = DEFAULT,
1070
+ /,
1063
1071
  **kwargs: Any,
1064
1072
  ):
1065
1073
  if _field is not DEFAULT:
@@ -1147,6 +1155,7 @@ class Match(Query):
1147
1155
  self,
1148
1156
  _field: Union[str, "InstrumentedField", "DefaultType"] = DEFAULT,
1149
1157
  _value: Union["types.MatchQuery", Dict[str, Any], "DefaultType"] = DEFAULT,
1158
+ /,
1150
1159
  **kwargs: Any,
1151
1160
  ):
1152
1161
  if _field is not DEFAULT:
@@ -1212,6 +1221,7 @@ class MatchBoolPrefix(Query):
1212
1221
  _value: Union[
1213
1222
  "types.MatchBoolPrefixQuery", Dict[str, Any], "DefaultType"
1214
1223
  ] = DEFAULT,
1224
+ /,
1215
1225
  **kwargs: Any,
1216
1226
  ):
1217
1227
  if _field is not DEFAULT:
@@ -1272,6 +1282,7 @@ class MatchPhrase(Query):
1272
1282
  _value: Union[
1273
1283
  "types.MatchPhraseQuery", Dict[str, Any], "DefaultType"
1274
1284
  ] = DEFAULT,
1285
+ /,
1275
1286
  **kwargs: Any,
1276
1287
  ):
1277
1288
  if _field is not DEFAULT:
@@ -1297,6 +1308,7 @@ class MatchPhrasePrefix(Query):
1297
1308
  _value: Union[
1298
1309
  "types.MatchPhrasePrefixQuery", Dict[str, Any], "DefaultType"
1299
1310
  ] = DEFAULT,
1311
+ /,
1300
1312
  **kwargs: Any,
1301
1313
  ):
1302
1314
  if _field is not DEFAULT:
@@ -1780,6 +1792,7 @@ class Prefix(Query):
1780
1792
  self,
1781
1793
  _field: Union[str, "InstrumentedField", "DefaultType"] = DEFAULT,
1782
1794
  _value: Union["types.PrefixQuery", Dict[str, Any], "DefaultType"] = DEFAULT,
1795
+ /,
1783
1796
  **kwargs: Any,
1784
1797
  ):
1785
1798
  if _field is not DEFAULT:
@@ -1946,6 +1959,7 @@ class Range(Query):
1946
1959
  self,
1947
1960
  _field: Union[str, "InstrumentedField", "DefaultType"] = DEFAULT,
1948
1961
  _value: Union["wrappers.Range[Any]", Dict[str, Any], "DefaultType"] = DEFAULT,
1962
+ /,
1949
1963
  **kwargs: Any,
1950
1964
  ):
1951
1965
  if _field is not DEFAULT:
@@ -2024,6 +2038,7 @@ class Regexp(Query):
2024
2038
  self,
2025
2039
  _field: Union[str, "InstrumentedField", "DefaultType"] = DEFAULT,
2026
2040
  _value: Union["types.RegexpQuery", Dict[str, Any], "DefaultType"] = DEFAULT,
2041
+ /,
2027
2042
  **kwargs: Any,
2028
2043
  ):
2029
2044
  if _field is not DEFAULT:
@@ -2194,6 +2209,7 @@ class Shape(Query):
2194
2209
  self,
2195
2210
  _field: Union[str, "InstrumentedField", "DefaultType"] = DEFAULT,
2196
2211
  _value: Union["types.ShapeFieldQuery", Dict[str, Any], "DefaultType"] = DEFAULT,
2212
+ /,
2197
2213
  *,
2198
2214
  ignore_unmapped: Union[bool, "DefaultType"] = DEFAULT,
2199
2215
  boost: Union[float, "DefaultType"] = DEFAULT,
@@ -2552,6 +2568,7 @@ class SpanTerm(Query):
2552
2568
  self,
2553
2569
  _field: Union[str, "InstrumentedField", "DefaultType"] = DEFAULT,
2554
2570
  _value: Union["types.SpanTermQuery", Dict[str, Any], "DefaultType"] = DEFAULT,
2571
+ /,
2555
2572
  **kwargs: Any,
2556
2573
  ):
2557
2574
  if _field is not DEFAULT:
@@ -2672,6 +2689,7 @@ class Term(Query):
2672
2689
  self,
2673
2690
  _field: Union[str, "InstrumentedField", "DefaultType"] = DEFAULT,
2674
2691
  _value: Union["types.TermQuery", Dict[str, Any], "DefaultType"] = DEFAULT,
2692
+ /,
2675
2693
  **kwargs: Any,
2676
2694
  ):
2677
2695
  if _field is not DEFAULT:
@@ -2706,6 +2724,7 @@ class Terms(Query):
2706
2724
  Dict[str, Any],
2707
2725
  "DefaultType",
2708
2726
  ] = DEFAULT,
2727
+ /,
2709
2728
  *,
2710
2729
  boost: Union[float, "DefaultType"] = DEFAULT,
2711
2730
  _name: Union[str, "DefaultType"] = DEFAULT,
@@ -2739,6 +2758,7 @@ class TermsSet(Query):
2739
2758
  self,
2740
2759
  _field: Union[str, "InstrumentedField", "DefaultType"] = DEFAULT,
2741
2760
  _value: Union["types.TermsSetQuery", Dict[str, Any], "DefaultType"] = DEFAULT,
2761
+ /,
2742
2762
  **kwargs: Any,
2743
2763
  ):
2744
2764
  if _field is not DEFAULT:
@@ -2764,6 +2784,7 @@ class TextExpansion(Query):
2764
2784
  _value: Union[
2765
2785
  "types.TextExpansionQuery", Dict[str, Any], "DefaultType"
2766
2786
  ] = DEFAULT,
2787
+ /,
2767
2788
  **kwargs: Any,
2768
2789
  ):
2769
2790
  if _field is not DEFAULT:
@@ -2788,6 +2809,7 @@ class WeightedTokens(Query):
2788
2809
  _value: Union[
2789
2810
  "types.WeightedTokensQuery", Dict[str, Any], "DefaultType"
2790
2811
  ] = DEFAULT,
2812
+ /,
2791
2813
  **kwargs: Any,
2792
2814
  ):
2793
2815
  if _field is not DEFAULT:
@@ -2809,6 +2831,7 @@ class Wildcard(Query):
2809
2831
  self,
2810
2832
  _field: Union[str, "InstrumentedField", "DefaultType"] = DEFAULT,
2811
2833
  _value: Union["types.WildcardQuery", Dict[str, Any], "DefaultType"] = DEFAULT,
2834
+ /,
2812
2835
  **kwargs: Any,
2813
2836
  ):
2814
2837
  if _field is not DEFAULT:
@@ -17,8 +17,7 @@
17
17
 
18
18
  from typing import Any
19
19
 
20
- from elasticsearch.serializer import JSONSerializer
21
-
20
+ from ..serializer import JSONSerializer
22
21
  from .utils import AttrList
23
22
 
24
23
 
@@ -937,6 +937,7 @@ class GeoDistanceSort(AttrDict[Any]):
937
937
  Dict[str, Any],
938
938
  "DefaultType",
939
939
  ] = DEFAULT,
940
+ /,
940
941
  *,
941
942
  mode: Union[
942
943
  Literal["min", "max", "sum", "avg", "median"], DefaultType
@@ -3259,6 +3260,7 @@ class SortOptions(AttrDict[Any]):
3259
3260
  self,
3260
3261
  _field: Union[str, "InstrumentedField", "DefaultType"] = DEFAULT,
3261
3262
  _value: Union["FieldSort", Dict[str, Any], "DefaultType"] = DEFAULT,
3263
+ /,
3262
3264
  *,
3263
3265
  _score: Union["ScoreSort", Dict[str, Any], DefaultType] = DEFAULT,
3264
3266
  _doc: Union["ScoreSort", Dict[str, Any], DefaultType] = DEFAULT,
@@ -44,8 +44,7 @@ from .exceptions import UnknownDslObject, ValidationException
44
44
  if TYPE_CHECKING:
45
45
  from elastic_transport import ObjectApiResponse
46
46
 
47
- from elasticsearch import AsyncElasticsearch, Elasticsearch
48
-
47
+ from .. import AsyncElasticsearch, Elasticsearch
49
48
  from .document_base import DocumentOptions
50
49
  from .field import Field
51
50
  from .index_base import IndexBase
@@ -124,7 +124,7 @@ class ESQLBase(ABC):
124
124
  if re.fullmatch(r"[a-zA-Z_@][a-zA-Z0-9_\.]*", s):
125
125
  return s
126
126
  # this identifier needs to be escaped
127
- s.replace("`", "``")
127
+ s = s.replace("`", "``")
128
128
  return f"`{s}`"
129
129
 
130
130
  @staticmethod
@@ -18,8 +18,8 @@
18
18
  import json
19
19
  from typing import Any
20
20
 
21
- from elasticsearch.dsl.document_base import InstrumentedExpression
22
- from elasticsearch.esql.esql import ESQLBase, ExpressionType
21
+ from ..dsl.document_base import InstrumentedExpression
22
+ from ..esql.esql import ESQLBase, ExpressionType
23
23
 
24
24
 
25
25
  def _render(v: Any) -> str:
@@ -15,31 +15,31 @@
15
15
  # specific language governing permissions and limitations
16
16
  # under the License.
17
17
 
18
- from elasticsearch.helpers.vectorstore._async.embedding_service import (
18
+ from ...helpers.vectorstore._async.embedding_service import (
19
19
  AsyncElasticsearchEmbeddings,
20
20
  AsyncEmbeddingService,
21
21
  )
22
- from elasticsearch.helpers.vectorstore._async.strategies import (
22
+ from ...helpers.vectorstore._async.strategies import (
23
23
  AsyncBM25Strategy,
24
24
  AsyncDenseVectorScriptScoreStrategy,
25
25
  AsyncDenseVectorStrategy,
26
26
  AsyncRetrievalStrategy,
27
27
  AsyncSparseVectorStrategy,
28
28
  )
29
- from elasticsearch.helpers.vectorstore._async.vectorstore import AsyncVectorStore
30
- from elasticsearch.helpers.vectorstore._sync.embedding_service import (
29
+ from ...helpers.vectorstore._async.vectorstore import AsyncVectorStore
30
+ from ...helpers.vectorstore._sync.embedding_service import (
31
31
  ElasticsearchEmbeddings,
32
32
  EmbeddingService,
33
33
  )
34
- from elasticsearch.helpers.vectorstore._sync.strategies import (
34
+ from ...helpers.vectorstore._sync.strategies import (
35
35
  BM25Strategy,
36
36
  DenseVectorScriptScoreStrategy,
37
37
  DenseVectorStrategy,
38
38
  RetrievalStrategy,
39
39
  SparseVectorStrategy,
40
40
  )
41
- from elasticsearch.helpers.vectorstore._sync.vectorstore import VectorStore
42
- from elasticsearch.helpers.vectorstore._utils import DistanceMetric
41
+ from ...helpers.vectorstore._sync.vectorstore import VectorStore
42
+ from ...helpers.vectorstore._utils import DistanceMetric
43
43
 
44
44
  __all__ = [
45
45
  "AsyncBM25Strategy",
@@ -15,7 +15,7 @@
15
15
  # specific language governing permissions and limitations
16
16
  # under the License.
17
17
 
18
- from elasticsearch import AsyncElasticsearch, BadRequestError, NotFoundError
18
+ from .... import AsyncElasticsearch, BadRequestError, NotFoundError
19
19
 
20
20
 
21
21
  async def model_must_be_deployed(client: AsyncElasticsearch, model_id: str) -> None:
@@ -18,8 +18,8 @@
18
18
  from abc import ABC, abstractmethod
19
19
  from typing import List
20
20
 
21
- from elasticsearch import AsyncElasticsearch
22
- from elasticsearch._version import __versionstr__ as lib_version
21
+ from .... import AsyncElasticsearch
22
+ from ...._version import __versionstr__ as lib_version
23
23
 
24
24
 
25
25
  class AsyncEmbeddingService(ABC):
@@ -18,9 +18,9 @@
18
18
  from abc import ABC, abstractmethod
19
19
  from typing import Any, Dict, List, Optional, Tuple, Union, cast
20
20
 
21
- from elasticsearch import AsyncElasticsearch
22
- from elasticsearch.helpers.vectorstore._async._utils import model_must_be_deployed
23
- from elasticsearch.helpers.vectorstore._utils import DistanceMetric
21
+ from .... import AsyncElasticsearch
22
+ from ....helpers.vectorstore._async._utils import model_must_be_deployed
23
+ from ....helpers.vectorstore._utils import DistanceMetric
24
24
 
25
25
 
26
26
  class AsyncRetrievalStrategy(ABC):
@@ -19,14 +19,14 @@ import logging
19
19
  import uuid
20
20
  from typing import Any, Callable, Dict, List, Optional
21
21
 
22
- from elasticsearch import AsyncElasticsearch
23
- from elasticsearch._version import __versionstr__ as lib_version
24
- from elasticsearch.helpers import BulkIndexError, async_bulk
25
- from elasticsearch.helpers.vectorstore import (
22
+ from .... import AsyncElasticsearch
23
+ from ...._version import __versionstr__ as lib_version
24
+ from ....helpers import BulkIndexError, async_bulk
25
+ from ....helpers.vectorstore import (
26
26
  AsyncEmbeddingService,
27
27
  AsyncRetrievalStrategy,
28
28
  )
29
- from elasticsearch.helpers.vectorstore._utils import maximal_marginal_relevance
29
+ from ....helpers.vectorstore._utils import maximal_marginal_relevance
30
30
 
31
31
  logger = logging.getLogger(__name__)
32
32
 
@@ -15,7 +15,7 @@
15
15
  # specific language governing permissions and limitations
16
16
  # under the License.
17
17
 
18
- from elasticsearch import BadRequestError, Elasticsearch, NotFoundError
18
+ from .... import BadRequestError, Elasticsearch, NotFoundError
19
19
 
20
20
 
21
21
  def model_must_be_deployed(client: Elasticsearch, model_id: str) -> None:
@@ -18,8 +18,8 @@
18
18
  from abc import ABC, abstractmethod
19
19
  from typing import List
20
20
 
21
- from elasticsearch import Elasticsearch
22
- from elasticsearch._version import __versionstr__ as lib_version
21
+ from .... import Elasticsearch
22
+ from ...._version import __versionstr__ as lib_version
23
23
 
24
24
 
25
25
  class EmbeddingService(ABC):
@@ -18,9 +18,9 @@
18
18
  from abc import ABC, abstractmethod
19
19
  from typing import Any, Dict, List, Optional, Tuple, Union, cast
20
20
 
21
- from elasticsearch import Elasticsearch
22
- from elasticsearch.helpers.vectorstore._sync._utils import model_must_be_deployed
23
- from elasticsearch.helpers.vectorstore._utils import DistanceMetric
21
+ from .... import Elasticsearch
22
+ from ....helpers.vectorstore._sync._utils import model_must_be_deployed
23
+ from ....helpers.vectorstore._utils import DistanceMetric
24
24
 
25
25
 
26
26
  class RetrievalStrategy(ABC):
@@ -19,14 +19,14 @@ import logging
19
19
  import uuid
20
20
  from typing import Any, Callable, Dict, List, Optional
21
21
 
22
- from elasticsearch import Elasticsearch
23
- from elasticsearch._version import __versionstr__ as lib_version
24
- from elasticsearch.helpers import BulkIndexError, bulk
25
- from elasticsearch.helpers.vectorstore import (
22
+ from .... import Elasticsearch
23
+ from ...._version import __versionstr__ as lib_version
24
+ from ....helpers import BulkIndexError, bulk
25
+ from ....helpers.vectorstore import (
26
26
  EmbeddingService,
27
27
  RetrievalStrategy,
28
28
  )
29
- from elasticsearch.helpers.vectorstore._utils import maximal_marginal_relevance
29
+ from ....helpers.vectorstore._utils import maximal_marginal_relevance
30
30
 
31
31
  logger = logging.getLogger(__name__)
32
32
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: elasticsearch
3
- Version: 8.19.2
3
+ Version: 8.19.3
4
4
  Summary: Python client for Elasticsearch
5
5
  Project-URL: Documentation, https://elasticsearch-py.readthedocs.io/
6
6
  Project-URL: Homepage, https://github.com/elastic/elasticsearch-py