Skip to content

Commit 4ec2881

Browse files
Add Elasticsearch-DSL code
1 parent d5ce56f commit 4ec2881

File tree

127 files changed

+38086
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

127 files changed

+38086
-1
lines changed

elasticsearch/dsl/__init__.py

Lines changed: 206 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,206 @@
1+
# Licensed to Elasticsearch B.V. under one or more contributor
2+
# license agreements. See the NOTICE file distributed with
3+
# this work for additional information regarding copyright
4+
# ownership. Elasticsearch B.V. licenses this file to you under
5+
# the Apache License, Version 2.0 (the "License"); you may
6+
# not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
from . import async_connections, connections
19+
from .aggs import A, Agg
20+
from .analysis import analyzer, char_filter, normalizer, token_filter, tokenizer
21+
from .document import AsyncDocument, Document
22+
from .document_base import InnerDoc, M, MetaField, mapped_field
23+
from .exceptions import (
24+
ElasticsearchDslException,
25+
IllegalOperation,
26+
UnknownDslObject,
27+
ValidationException,
28+
)
29+
from .faceted_search import (
30+
AsyncFacetedSearch,
31+
DateHistogramFacet,
32+
Facet,
33+
FacetedResponse,
34+
FacetedSearch,
35+
HistogramFacet,
36+
NestedFacet,
37+
RangeFacet,
38+
TermsFacet,
39+
)
40+
from .field import (
41+
Binary,
42+
Boolean,
43+
Byte,
44+
Completion,
45+
ConstantKeyword,
46+
CustomField,
47+
Date,
48+
DateRange,
49+
DenseVector,
50+
Double,
51+
DoubleRange,
52+
Field,
53+
Float,
54+
FloatRange,
55+
GeoPoint,
56+
GeoShape,
57+
HalfFloat,
58+
Integer,
59+
IntegerRange,
60+
Ip,
61+
IpRange,
62+
Join,
63+
Keyword,
64+
Long,
65+
LongRange,
66+
Murmur3,
67+
Nested,
68+
Object,
69+
Percolator,
70+
Point,
71+
RangeField,
72+
RankFeature,
73+
RankFeatures,
74+
ScaledFloat,
75+
SearchAsYouType,
76+
Shape,
77+
Short,
78+
SparseVector,
79+
Text,
80+
TokenCount,
81+
construct_field,
82+
)
83+
from .function import SF
84+
from .index import (
85+
AsyncComposableIndexTemplate,
86+
AsyncIndex,
87+
AsyncIndexTemplate,
88+
ComposableIndexTemplate,
89+
Index,
90+
IndexTemplate,
91+
)
92+
from .mapping import AsyncMapping, Mapping
93+
from .query import Q, Query
94+
from .response import AggResponse, Response, UpdateByQueryResponse
95+
from .search import (
96+
AsyncEmptySearch,
97+
AsyncMultiSearch,
98+
AsyncSearch,
99+
EmptySearch,
100+
MultiSearch,
101+
Search,
102+
)
103+
from .update_by_query import AsyncUpdateByQuery, UpdateByQuery
104+
from .utils import AttrDict, AttrList, DslBase
105+
from .wrappers import Range
106+
107+
VERSION = (8, 17, 1)
108+
__version__ = VERSION
109+
__versionstr__ = ".".join(map(str, VERSION))
110+
__all__ = [
111+
"A",
112+
"Agg",
113+
"AggResponse",
114+
"AsyncComposableIndexTemplate",
115+
"AsyncDocument",
116+
"AsyncEmptySearch",
117+
"AsyncFacetedSearch",
118+
"AsyncIndex",
119+
"AsyncIndexTemplate",
120+
"AsyncMapping",
121+
"AsyncMultiSearch",
122+
"AsyncSearch",
123+
"AsyncUpdateByQuery",
124+
"AttrDict",
125+
"AttrList",
126+
"Binary",
127+
"Boolean",
128+
"Byte",
129+
"Completion",
130+
"ComposableIndexTemplate",
131+
"ConstantKeyword",
132+
"CustomField",
133+
"Date",
134+
"DateHistogramFacet",
135+
"DateRange",
136+
"DenseVector",
137+
"Document",
138+
"Double",
139+
"DoubleRange",
140+
"DslBase",
141+
"ElasticsearchDslException",
142+
"EmptySearch",
143+
"Facet",
144+
"FacetedResponse",
145+
"FacetedSearch",
146+
"Field",
147+
"Float",
148+
"FloatRange",
149+
"GeoPoint",
150+
"GeoShape",
151+
"HalfFloat",
152+
"HistogramFacet",
153+
"IllegalOperation",
154+
"Index",
155+
"IndexTemplate",
156+
"InnerDoc",
157+
"Integer",
158+
"IntegerRange",
159+
"Ip",
160+
"IpRange",
161+
"Join",
162+
"Keyword",
163+
"Long",
164+
"LongRange",
165+
"M",
166+
"Mapping",
167+
"MetaField",
168+
"MultiSearch",
169+
"Murmur3",
170+
"Nested",
171+
"NestedFacet",
172+
"Object",
173+
"Percolator",
174+
"Point",
175+
"Q",
176+
"Query",
177+
"Range",
178+
"RangeFacet",
179+
"RangeField",
180+
"RankFeature",
181+
"RankFeatures",
182+
"Response",
183+
"SF",
184+
"ScaledFloat",
185+
"Search",
186+
"SearchAsYouType",
187+
"Shape",
188+
"Short",
189+
"SparseVector",
190+
"TermsFacet",
191+
"Text",
192+
"TokenCount",
193+
"UnknownDslObject",
194+
"UpdateByQuery",
195+
"UpdateByQueryResponse",
196+
"ValidationException",
197+
"analyzer",
198+
"async_connections",
199+
"char_filter",
200+
"connections",
201+
"construct_field",
202+
"mapped_field",
203+
"normalizer",
204+
"token_filter",
205+
"tokenizer",
206+
]

elasticsearch/dsl/_async/__init__.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Licensed to Elasticsearch B.V. under one or more contributor
2+
# license agreements. See the NOTICE file distributed with
3+
# this work for additional information regarding copyright
4+
# ownership. Elasticsearch B.V. licenses this file to you under
5+
# the Apache License, Version 2.0 (the "License"); you may
6+
# not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.

0 commit comments

Comments
 (0)