@ontos-ai/knowhere-sdk 2.2.0 → 2.3.0
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/README.md +6 -1
- package/dist/index.d.mts +7 -1
- package/dist/index.d.ts +7 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -515,12 +515,17 @@ without creating SDK local-disk cache state. Use `syncParsedDocument(...)` to
|
|
|
515
515
|
explicitly resume or retry parsed-storage sync for an existing `documentId`,
|
|
516
516
|
`jobId`, or local parsed result.
|
|
517
517
|
|
|
518
|
-
|
|
518
|
+
Retrieval queries can limit documents and exclude documents or sections for one request.
|
|
519
|
+
`includeDocumentIds?: string[]` restricts retrieval to the supplied document IDs.
|
|
520
|
+
Omitting it leaves documents unrestricted by inclusion; passing `[]` matches no
|
|
521
|
+
documents. Exclusions take precedence over inclusions, including when a document
|
|
522
|
+
ID appears in both `includeDocumentIds` and `excludeDocumentIds`.
|
|
519
523
|
|
|
520
524
|
```typescript
|
|
521
525
|
const followUp = await client.retrieval.query({
|
|
522
526
|
namespace: 'support-center',
|
|
523
527
|
query: 'battery charging',
|
|
528
|
+
includeDocumentIds: ['doc_123', 'doc_old'],
|
|
524
529
|
excludeDocumentIds: ['doc_old'],
|
|
525
530
|
excludeSections: [{ documentId: 'doc_123', sectionPath: 'Appendix / Legal' }],
|
|
526
531
|
});
|
package/dist/index.d.mts
CHANGED
|
@@ -859,7 +859,13 @@ interface RetrievalQueryParams {
|
|
|
859
859
|
threshold?: number;
|
|
860
860
|
/** Override the internal per-channel recall count */
|
|
861
861
|
internalRecallK?: number;
|
|
862
|
-
/**
|
|
862
|
+
/**
|
|
863
|
+
* Limit retrieval to these documents for this request only.
|
|
864
|
+
* Omitted means no document inclusion restriction; [] matches no documents.
|
|
865
|
+
* Exclusions take precedence over inclusions.
|
|
866
|
+
*/
|
|
867
|
+
includeDocumentIds?: string[];
|
|
868
|
+
/** Documents to exclude for this request only, even when included in includeDocumentIds. */
|
|
863
869
|
excludeDocumentIds?: string[];
|
|
864
870
|
/** Document sections to exclude for this request only */
|
|
865
871
|
excludeSections?: RetrievalSectionExclusion[];
|
package/dist/index.d.ts
CHANGED
|
@@ -859,7 +859,13 @@ interface RetrievalQueryParams {
|
|
|
859
859
|
threshold?: number;
|
|
860
860
|
/** Override the internal per-channel recall count */
|
|
861
861
|
internalRecallK?: number;
|
|
862
|
-
/**
|
|
862
|
+
/**
|
|
863
|
+
* Limit retrieval to these documents for this request only.
|
|
864
|
+
* Omitted means no document inclusion restriction; [] matches no documents.
|
|
865
|
+
* Exclusions take precedence over inclusions.
|
|
866
|
+
*/
|
|
867
|
+
includeDocumentIds?: string[];
|
|
868
|
+
/** Documents to exclude for this request only, even when included in includeDocumentIds. */
|
|
863
869
|
excludeDocumentIds?: string[];
|
|
864
870
|
/** Document sections to exclude for this request only */
|
|
865
871
|
excludeSections?: RetrievalSectionExclusion[];
|