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 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
- # class Operator(str, Enum):
305
- # AND = "and"
306
- # OR = "or"
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
- # TODO: Not exposed until implemented in nidx
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
- # )
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
+ )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: nucliadb_models
3
- Version: 6.3.0.post3396
3
+ Version: 6.3.0.post3402
4
4
  Author-email: Nuclia <nucliadb@nuclia.com>
5
5
  License: AGPL
6
6
  Project-URL: Homepage, https://nuclia.com
@@ -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=c6lgFaN8SATosD9d-fuuxsDrloVcZpGq23i8w656YaA,11034
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.post3396.dist-info/METADATA,sha256=_22YMJS5B6beKJwP_00UfU6jO6XO5D8BUwWhuslGBeA,759
33
- nucliadb_models-6.3.0.post3396.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
34
- nucliadb_models-6.3.0.post3396.dist-info/top_level.txt,sha256=UrY1I8oeovIRwkXLYplssTrxQdUjhSEFDFbnwaIV3tA,16
35
- nucliadb_models-6.3.0.post3396.dist-info/RECORD,,
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,,