@digipair/skill-vespa 0.5.5 → 0.5.7
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.
- package/index.cjs.js +10 -1
- package/index.esm.js +10 -1
- package/package.json +1 -1
package/index.cjs.js
CHANGED
@@ -34596,7 +34596,16 @@ let VespaService = class VespaService {
|
|
34596
34596
|
if (queryUuids.length > 0) {
|
34597
34597
|
documents.push(...await this.searchDocuments(baseUrl, collection, `uuid in (${queryUuids.map((uuid)=>`"${uuid}"`).join(',')})`, options));
|
34598
34598
|
}
|
34599
|
-
|
34599
|
+
const results = [];
|
34600
|
+
for (const chunk of chunks){
|
34601
|
+
const document = documents.find(({ parent_uuid })=>parent_uuid === chunk.parent_uuid);
|
34602
|
+
if (document && !results.find(({ uuid })=>uuid === document.uuid)) {
|
34603
|
+
results.push(_extends({}, document, {
|
34604
|
+
matchfeatures: chunk.matchfeatures
|
34605
|
+
}));
|
34606
|
+
}
|
34607
|
+
}
|
34608
|
+
return results;
|
34600
34609
|
}
|
34601
34610
|
async prepareDocuments(documents) {
|
34602
34611
|
const parents = documents.map((document)=>{
|
package/index.esm.js
CHANGED
@@ -34592,7 +34592,16 @@ let VespaService = class VespaService {
|
|
34592
34592
|
if (queryUuids.length > 0) {
|
34593
34593
|
documents.push(...await this.searchDocuments(baseUrl, collection, `uuid in (${queryUuids.map((uuid)=>`"${uuid}"`).join(',')})`, options));
|
34594
34594
|
}
|
34595
|
-
|
34595
|
+
const results = [];
|
34596
|
+
for (const chunk of chunks){
|
34597
|
+
const document = documents.find(({ parent_uuid })=>parent_uuid === chunk.parent_uuid);
|
34598
|
+
if (document && !results.find(({ uuid })=>uuid === document.uuid)) {
|
34599
|
+
results.push(_extends({}, document, {
|
34600
|
+
matchfeatures: chunk.matchfeatures
|
34601
|
+
}));
|
34602
|
+
}
|
34603
|
+
}
|
34604
|
+
return results;
|
34596
34605
|
}
|
34597
34606
|
async prepareDocuments(documents) {
|
34598
34607
|
const parents = documents.map((document)=>{
|