[FIX] ingest-acn: usa upsertBatch/deleteByFilter (metodi reali VectorService)
I metodi corretti sono upsertBatch() e deleteByFilter(), non upsertPoints/deletePoints. Ingest eseguito su host: 203 requisiti ACN confermati in Qdrant nis2_kb. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
94bb7bd32b
commit
6365d5dfda
@ -20,7 +20,7 @@
|
||||
*
|
||||
* Opzioni: --only=importante|essenziale | --dry-run | --no-purge
|
||||
*
|
||||
* NB metodi VectorService REALI: upsertPoints(array), deletePoints(array filtro),
|
||||
* NB metodi VectorService REALI: upsertBatch(array), deleteByFilter(array filtro),
|
||||
* ensureCollection(int dims). EmbedService: embed(text), ->dims (512).
|
||||
* ============================================================================
|
||||
*/
|
||||
@ -118,7 +118,7 @@ if (!$dryRun) {
|
||||
}
|
||||
if (!$noPurge) {
|
||||
try {
|
||||
$vector->deletePoints(['must' => [
|
||||
$vector->deleteByFilter(['must' => [
|
||||
['key' => 'scope', 'match' => ['value' => 'SYSTEM']],
|
||||
['key' => 'entity_type', 'match' => ['value' => ACN_ENTITY_TYPE]],
|
||||
['key' => 'source', 'match' => ['value' => ACN_SOURCE]],
|
||||
@ -133,7 +133,7 @@ if (!$dryRun) {
|
||||
$ok = 0; $fail = 0; $failed = []; $batch = []; $BATCH_SIZE = 32;
|
||||
$flush = function () use (&$batch, $vector) {
|
||||
if (empty($batch)) return;
|
||||
$vector->upsertPoints($batch);
|
||||
$vector->upsertBatch($batch);
|
||||
$batch = [];
|
||||
};
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user