nucliadb-models 6.3.0.post3396__py3-none-any.whl → 6.3.0.post3402__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.
Potentially problematic release.
This version of nucliadb-models might be problematic. Click here for more details.
- nucliadb_models/filter.py +12 -12
- {nucliadb_models-6.3.0.post3396.dist-info → nucliadb_models-6.3.0.post3402.dist-info}/METADATA +1 -1
- {nucliadb_models-6.3.0.post3396.dist-info → nucliadb_models-6.3.0.post3402.dist-info}/RECORD +5 -5
- {nucliadb_models-6.3.0.post3396.dist-info → nucliadb_models-6.3.0.post3402.dist-info}/WHEEL +0 -0
- {nucliadb_models-6.3.0.post3396.dist-info → nucliadb_models-6.3.0.post3402.dist-info}/top_level.txt +0 -0
nucliadb_models/filter.py
CHANGED
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
19
19
|
#
|
|
20
20
|
|
|
21
|
+
from enum import Enum
|
|
21
22
|
from typing import Any, Generic, Literal, Optional, TypeVar, Union
|
|
22
23
|
|
|
23
24
|
import pydantic
|
|
@@ -301,9 +302,9 @@ class FilterExpression(BaseModel, extra="forbid"):
|
|
|
301
302
|
`fields`, `filters`, `range_*`, `resource_filters`, `keyword_filters`.
|
|
302
303
|
"""
|
|
303
304
|
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
305
|
+
class Operator(str, Enum):
|
|
306
|
+
AND = "and"
|
|
307
|
+
OR = "or"
|
|
307
308
|
|
|
308
309
|
field: Optional[FieldFilterExpression] = pydantic.Field(
|
|
309
310
|
default=None, description="Filter to apply to fields"
|
|
@@ -312,12 +313,11 @@ class FilterExpression(BaseModel, extra="forbid"):
|
|
|
312
313
|
default=None, description="Filter to apply to each text block"
|
|
313
314
|
)
|
|
314
315
|
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
# )
|
|
316
|
+
operator: Operator = pydantic.Field(
|
|
317
|
+
default=Operator.AND,
|
|
318
|
+
description=(
|
|
319
|
+
"How to combine field and paragraph filters (default is AND)."
|
|
320
|
+
"AND returns text blocks that match both filters."
|
|
321
|
+
"OR returns text_blocks that match one of the two filters"
|
|
322
|
+
),
|
|
323
|
+
)
|
{nucliadb_models-6.3.0.post3396.dist-info → nucliadb_models-6.3.0.post3402.dist-info}/RECORD
RENAMED
|
@@ -8,7 +8,7 @@ nucliadb_models/export_import.py,sha256=A1KTjwQCRtyVAWcgabXsdltI78rauXBmZX1ie6Rx
|
|
|
8
8
|
nucliadb_models/external_index_providers.py,sha256=aVyj-P4kVqfqPjF13E_lUM0FZsq8-DTbIsh-kHOgt2s,1787
|
|
9
9
|
nucliadb_models/extracted.py,sha256=wnTjMsSPk1iZFtn4eFrBC9fSOZkNTeHQ_B9CRyaL0cA,6444
|
|
10
10
|
nucliadb_models/file.py,sha256=4pDfQtXaBNB-ExeXC7NIdt33RbJp_u53_x8ACVkHXCM,2174
|
|
11
|
-
nucliadb_models/filter.py,sha256=
|
|
11
|
+
nucliadb_models/filter.py,sha256=3CxqwhhVBy8a-aFhwxv0DLu1h3--mSz0wgiNCK9YvBU,10984
|
|
12
12
|
nucliadb_models/labels.py,sha256=OUlX-apmFkibEN9bWThRJlbCD84hzJdddN1YYUV2Y3w,4201
|
|
13
13
|
nucliadb_models/link.py,sha256=NRfsjLQpjZXndkb5o8qnSVPqb2knqk2kk5_iQB4AkaY,2785
|
|
14
14
|
nucliadb_models/metadata.py,sha256=fiIJfht0Eg5a65ud2FdmHzElZ8VGdrDQ-F65-VJI4IE,8151
|
|
@@ -29,7 +29,7 @@ nucliadb_models/agents/ingestion.py,sha256=mV7gV6VpYg4VNpc59K3275TMUJZbUzeUnp3SZ
|
|
|
29
29
|
nucliadb_models/internal/__init__.py,sha256=cp15ZcFnHvpcu_5-aK2A4uUyvuZVV_MJn4bIXMa20ks,835
|
|
30
30
|
nucliadb_models/internal/predict.py,sha256=5rgUPrH_98gerySOZ-TR2PX_qzCGF1_8VxyOu3bGhis,2281
|
|
31
31
|
nucliadb_models/internal/shards.py,sha256=uZLsMkYWrJDHq3xy_w7snSeV2X3aDBuht9GC_MG3sKc,1976
|
|
32
|
-
nucliadb_models-6.3.0.
|
|
33
|
-
nucliadb_models-6.3.0.
|
|
34
|
-
nucliadb_models-6.3.0.
|
|
35
|
-
nucliadb_models-6.3.0.
|
|
32
|
+
nucliadb_models-6.3.0.post3402.dist-info/METADATA,sha256=_8pFavb_oaaTHICxIE_ESdb582q8TtFy6bu9w1VWuIU,759
|
|
33
|
+
nucliadb_models-6.3.0.post3402.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
34
|
+
nucliadb_models-6.3.0.post3402.dist-info/top_level.txt,sha256=UrY1I8oeovIRwkXLYplssTrxQdUjhSEFDFbnwaIV3tA,16
|
|
35
|
+
nucliadb_models-6.3.0.post3402.dist-info/RECORD,,
|
|
File without changes
|
{nucliadb_models-6.3.0.post3396.dist-info → nucliadb_models-6.3.0.post3402.dist-info}/top_level.txt
RENAMED
|
File without changes
|