-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: rename mvi parameter ids to filter in get/delete (#1141)
To standardize how we select items in get item batch, get item metadata batch, and delete item batch, we use the term filter in methods, whether selecting by ids or filter expression.
- Loading branch information
Showing
5 changed files
with
52 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 12 additions & 6 deletions
18
packages/core/src/internal/clients/vector/IVectorIndexDataClient.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,47 @@ | ||
import { | ||
VectorCountItems, | ||
VectorUpsertItemBatch, | ||
VectorDeleteItemBatch, | ||
VectorSearch, | ||
VectorSearchAndFetchVectors, | ||
VectorGetItemBatch, | ||
VectorGetItemMetadataBatch, | ||
VectorSearch, | ||
VectorSearchAndFetchVectors, | ||
VectorUpsertItemBatch, | ||
} from '../../../messages/responses/vector'; | ||
import {VectorIndexItem} from '../../../messages/vector-index'; | ||
import {SearchOptions} from '../../../clients/IVectorIndexClient'; | ||
|
||
export interface IVectorIndexDataClient { | ||
countItems(indexName: string): Promise<VectorCountItems.Response>; | ||
|
||
upsertItemBatch( | ||
indexName: string, | ||
items: Array<VectorIndexItem> | ||
): Promise<VectorUpsertItemBatch.Response>; | ||
|
||
search( | ||
indexName: string, | ||
queryVector: Array<number>, | ||
options?: SearchOptions | ||
): Promise<VectorSearch.Response>; | ||
|
||
searchAndFetchVectors( | ||
indexName: string, | ||
queryVector: Array<number>, | ||
options?: SearchOptions | ||
): Promise<VectorSearchAndFetchVectors.Response>; | ||
|
||
deleteItemBatch( | ||
indexName: string, | ||
ids: Array<string> | ||
filter: Array<string> | ||
): Promise<VectorDeleteItemBatch.Response>; | ||
|
||
getItemBatch( | ||
indexName: string, | ||
ids: Array<string> | ||
filter: Array<string> | ||
): Promise<VectorGetItemBatch.Response>; | ||
|
||
getItemMetadataBatch( | ||
indexName: string, | ||
ids: Array<string> | ||
filter: Array<string> | ||
): Promise<VectorGetItemMetadataBatch.Response>; | ||
} |