nucliadb 6.3.1.post3504__py3-none-any.whl → 6.3.1.post3507__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.
@@ -314,12 +314,18 @@ class Processor:
314
314
  # index message
315
315
 
316
316
  if resource:
317
- await resource.compute_global_text()
318
- await resource.compute_global_tags(resource.indexer)
319
- await resource.compute_security(resource.indexer)
320
317
  if message.reindex:
321
318
  # when reindexing, let's just generate full new index message
319
+ # TODO - This should be improved in the future as it's not optimal for very large resources:
320
+ # As of now, there are some API operations that require fully reindexing all the fields of a resource.
321
+ # An example of this is classification label changes - we need to reindex all the fields of a resource to
322
+ # propagate the label changes to the index.
322
323
  resource.replace_indexer(await resource.generate_index_message(reindex=True))
324
+ else:
325
+ # TODO - Ideally we should only update the fields that have been changed in the current transaction.
326
+ await resource.compute_global_text()
327
+ await resource.compute_global_tags(resource.indexer)
328
+ await resource.compute_security(resource.indexer)
323
329
 
324
330
  if resource and resource.modified:
325
331
  await pgcatalog_update(txn, kbid, resource)
@@ -304,10 +304,7 @@ class Resource:
304
304
  @processor_observer.wrap({"type": "generate_index_message"})
305
305
  async def generate_index_message(self, reindex: bool = False) -> ResourceBrain:
306
306
  brain = ResourceBrain(rid=self.uuid)
307
- origin = await self.get_origin()
308
307
  basic = await self.get_basic()
309
- if basic is not None:
310
- brain.set_resource_metadata(basic, origin)
311
308
  await self.compute_security(brain)
312
309
  await self.compute_global_tags(brain)
313
310
  fields = await self.get_fields(force=True)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: nucliadb
3
- Version: 6.3.1.post3504
3
+ Version: 6.3.1.post3507
4
4
  Summary: NucliaDB
5
5
  Author-email: Nuclia <nucliadb@nuclia.com>
6
6
  License: AGPL
@@ -20,11 +20,11 @@ Classifier: Programming Language :: Python :: 3.12
20
20
  Classifier: Programming Language :: Python :: 3 :: Only
21
21
  Requires-Python: <4,>=3.9
22
22
  Description-Content-Type: text/markdown
23
- Requires-Dist: nucliadb-telemetry[all]>=6.3.1.post3504
24
- Requires-Dist: nucliadb-utils[cache,fastapi,storages]>=6.3.1.post3504
25
- Requires-Dist: nucliadb-protos>=6.3.1.post3504
26
- Requires-Dist: nucliadb-models>=6.3.1.post3504
27
- Requires-Dist: nidx-protos>=6.3.1.post3504
23
+ Requires-Dist: nucliadb-telemetry[all]>=6.3.1.post3507
24
+ Requires-Dist: nucliadb-utils[cache,fastapi,storages]>=6.3.1.post3507
25
+ Requires-Dist: nucliadb-protos>=6.3.1.post3507
26
+ Requires-Dist: nucliadb-models>=6.3.1.post3507
27
+ Requires-Dist: nidx-protos>=6.3.1.post3507
28
28
  Requires-Dist: nucliadb-admin-assets>=1.0.0.post1224
29
29
  Requires-Dist: nuclia-models>=0.24.2
30
30
  Requires-Dist: uvicorn
@@ -135,13 +135,13 @@ nucliadb/ingest/orm/entities.py,sha256=3_n6lKhBy2GsdmNmkh0_mvxP8md20OZsbtTNEmfJ8
135
135
  nucliadb/ingest/orm/exceptions.py,sha256=k4Esv4NtL4TrGTcsQpwrSfDhPQpiYcRbB1SpYmBX5MY,1432
136
136
  nucliadb/ingest/orm/knowledgebox.py,sha256=IGOPvBR1qXqDxE5DeiOdYCLdPgjzOVVpsASJ2zYvWwQ,23651
137
137
  nucliadb/ingest/orm/metrics.py,sha256=OkwMSPKLZcKba0ZTwtTiIxwBgaLMX5ydhGieKvi2y7E,1096
138
- nucliadb/ingest/orm/resource.py,sha256=dB0n7qQQZc0a4t_khp790koo9hIU1x_SIMl7HmBLsg8,44751
138
+ nucliadb/ingest/orm/resource.py,sha256=pKDqw193lLR4dHlggNe0-V3d6UCoikSfhfmhpOvaDc0,44625
139
139
  nucliadb/ingest/orm/utils.py,sha256=vCe_9UxHu26JDFGLwQ0wH-XyzJIpQCTK-Ow9dtZR5Vg,2716
140
140
  nucliadb/ingest/orm/processor/__init__.py,sha256=Aqd9wCNTvggkMkCY3WvoI8spdr94Jnqk-0iq9XpLs18,922
141
141
  nucliadb/ingest/orm/processor/auditing.py,sha256=TeYhXGJRyQ7ROytbb2u8R0fIh_FYi3HgTu3S1ribY3U,4623
142
142
  nucliadb/ingest/orm/processor/data_augmentation.py,sha256=HpSU9olDHcTfECDYCsmm4yA-Hu0mBrd_zTtx50XDGFE,5164
143
143
  nucliadb/ingest/orm/processor/pgcatalog.py,sha256=f32PIEXWktWzGDws6Ffife37OAfrseP5IOti_Cb4ir8,3012
144
- nucliadb/ingest/orm/processor/processor.py,sha256=2FxAetUvtHvg6l-24xYrmBdsyqc0RU1zmliel44581g,30945
144
+ nucliadb/ingest/orm/processor/processor.py,sha256=oaiZ9HUszhUbvNMCmDq5Xj_jtXiCDjMEyw2GqqQxFdY,31550
145
145
  nucliadb/ingest/orm/processor/sequence_manager.py,sha256=uqEphtI1Ir_yk9jRl2gPf7BlzzXWovbARY5MNZSBI_8,1704
146
146
  nucliadb/ingest/service/__init__.py,sha256=MME_G_ERxzJR6JW_hfE2qcfXpmpH1kdG-S0a-M0qRm8,2043
147
147
  nucliadb/ingest/service/exceptions.py,sha256=cp15ZcFnHvpcu_5-aK2A4uUyvuZVV_MJn4bIXMa20ks,835
@@ -339,8 +339,8 @@ nucliadb/writer/tus/local.py,sha256=7jYa_w9b-N90jWgN2sQKkNcomqn6JMVBOVeDOVYJHto,
339
339
  nucliadb/writer/tus/s3.py,sha256=vF0NkFTXiXhXq3bCVXXVV-ED38ECVoUeeYViP8uMqcU,8357
340
340
  nucliadb/writer/tus/storage.py,sha256=ToqwjoYnjI4oIcwzkhha_MPxi-k4Jk3Lt55zRwaC1SM,2903
341
341
  nucliadb/writer/tus/utils.py,sha256=MSdVbRsRSZVdkaum69_0wku7X3p5wlZf4nr6E0GMKbw,2556
342
- nucliadb-6.3.1.post3504.dist-info/METADATA,sha256=G6Q3Zo1wyyvaQRJMxf6elj7bqNXR61E5GN5yomcwV7k,4291
343
- nucliadb-6.3.1.post3504.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
344
- nucliadb-6.3.1.post3504.dist-info/entry_points.txt,sha256=XqGfgFDuY3zXQc8ewXM2TRVjTModIq851zOsgrmaXx4,1268
345
- nucliadb-6.3.1.post3504.dist-info/top_level.txt,sha256=hwYhTVnX7jkQ9gJCkVrbqEG1M4lT2F_iPQND1fCzF80,20
346
- nucliadb-6.3.1.post3504.dist-info/RECORD,,
342
+ nucliadb-6.3.1.post3507.dist-info/METADATA,sha256=VdCcUKBvXCIaQpWBQVkDsx5dP2Vr2C39kjGJeQ_i88g,4291
343
+ nucliadb-6.3.1.post3507.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
344
+ nucliadb-6.3.1.post3507.dist-info/entry_points.txt,sha256=XqGfgFDuY3zXQc8ewXM2TRVjTModIq851zOsgrmaXx4,1268
345
+ nucliadb-6.3.1.post3507.dist-info/top_level.txt,sha256=hwYhTVnX7jkQ9gJCkVrbqEG1M4lT2F_iPQND1fCzF80,20
346
+ nucliadb-6.3.1.post3507.dist-info/RECORD,,