You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-07 13:22:56 +03:00
Support Vector Similarity (#1785)
* ft.alter * support paramas * remove only and skip * merge * fix imports * add Vector field * update version * push attributes * typo * test * version check * remove .only * remove unued import * add support for DIALECT * clean code Co-authored-by: Avital-Fine <avital.fine@redis.com> Co-authored-by: leibale <leibale1998@gmail.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { RedisCommandArguments } from '@node-redis/client/dist/lib/commands';
|
||||
import { transformTuplesReply } from '@node-redis/client/dist/lib/commands/generic-transformers';
|
||||
import { pushSearchOptions, RedisSearchLanguages, PropertyName, SortByProperty, SearchReply } from '.';
|
||||
import { pushSearchOptions, RedisSearchLanguages, Params, PropertyName, SortByProperty, SearchReply } from '.';
|
||||
|
||||
export const FIRST_KEY_INDEX = 1;
|
||||
|
||||
@@ -54,6 +54,8 @@ export interface SearchOptions {
|
||||
from: number | string;
|
||||
size: number | string;
|
||||
};
|
||||
PARAMS?: Params;
|
||||
DIALECT?: number;
|
||||
}
|
||||
|
||||
export function transformArguments(
|
||||
@@ -61,9 +63,10 @@ export function transformArguments(
|
||||
query: string,
|
||||
options?: SearchOptions
|
||||
): RedisCommandArguments {
|
||||
const args: RedisCommandArguments = ['FT.SEARCH', index, query];
|
||||
pushSearchOptions(args, options);
|
||||
return args;
|
||||
return pushSearchOptions(
|
||||
['FT.SEARCH', index, query],
|
||||
options
|
||||
);
|
||||
}
|
||||
|
||||
export type SearchRawReply = Array<any>;
|
||||
|
Reference in New Issue
Block a user