@node-redis/search
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -1,3 +0,3 @@ | ||
import { CreateSchema } from '.'; | ||
export declare function transformArguments(index: string, schema: CreateSchema): Array<string>; | ||
import { RediSearchSchema } from '.'; | ||
export declare function transformArguments(index: string, schema: RediSearchSchema): Array<string>; | ||
export declare function transformReply(): 'OK'; |
@@ -1,2 +0,2 @@ | ||
import { RedisSearchLanguages, PropertyName, CreateSchema } from '.'; | ||
import { RedisSearchLanguages, PropertyName, RediSearchSchema } from '.'; | ||
interface CreateOptions { | ||
@@ -19,4 +19,4 @@ ON?: 'HASH' | 'JSON'; | ||
} | ||
export declare function transformArguments(index: string, schema: CreateSchema, options?: CreateOptions): Array<string>; | ||
export declare function transformArguments(index: string, schema: RediSearchSchema, options?: CreateOptions): Array<string>; | ||
export declare function transformReply(): 'OK'; | ||
export {}; |
@@ -137,3 +137,3 @@ import * as _LIST from './_LIST'; | ||
} | ||
declare type CreateSchemaField<T extends SchemaFieldTypes, E = Record<string, never>> = T | ({ | ||
declare type CreateSchemaField<T extends SchemaFieldTypes, E = Record<keyof any, any>> = T | ({ | ||
type: T; | ||
@@ -161,6 +161,6 @@ AS?: string; | ||
}>; | ||
export interface CreateSchema { | ||
export interface RediSearchSchema { | ||
[field: string]: CreateSchemaTextField | CreateSchemaNumericField | CreateSchemaGeoField | CreateSchemaTagField; | ||
} | ||
export declare function pushSchema(args: RedisCommandArguments, schema: CreateSchema): void; | ||
export declare function pushSchema(args: RedisCommandArguments, schema: RediSearchSchema): void; | ||
export declare function pushSearchOptions(args: RedisCommandArguments, options?: SearchOptions): RedisCommandArguments; | ||
@@ -167,0 +167,0 @@ interface SearchDocumentValue { |
@@ -185,3 +185,3 @@ "use strict"; | ||
switch (fieldOptions.type) { | ||
case 'TEXT': | ||
case SchemaFieldTypes.TEXT: | ||
if (fieldOptions.NOSTEM) { | ||
@@ -197,6 +197,6 @@ args.push('NOSTEM'); | ||
break; | ||
// case 'NUMERIC': | ||
// case 'GEO': | ||
// case SchemaFieldTypes.NUMERIC: | ||
// case SchemaFieldTypes.GEO: | ||
// break; | ||
case 'TAG': | ||
case SchemaFieldTypes.TAG: | ||
if (fieldOptions.SEPARATOR) { | ||
@@ -203,0 +203,0 @@ args.push('SEPARATOR', fieldOptions.SEPARATOR); |
export { default } from './commands'; | ||
export { SchemaFieldTypes, SchemaTextFieldPhonetics } from './commands'; | ||
export { RediSearchSchema, SchemaFieldTypes, SchemaTextFieldPhonetics, SearchReply } from './commands'; | ||
export { AggregateSteps, AggregateGroupByReducers } from './commands/AGGREGATE'; | ||
export { SearchOptions } from './commands/SEARCH'; |
{ | ||
"name": "@node-redis/search", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"license": "MIT", | ||
@@ -21,10 +21,10 @@ "main": "./dist/index.js", | ||
"@node-redis/test-utils": "*", | ||
"@types/node": "^17.0.5", | ||
"@types/node": "^17.0.13", | ||
"nyc": "^15.1.0", | ||
"release-it": "^14.12.1", | ||
"release-it": "^14.12.4", | ||
"source-map-support": "^0.5.21", | ||
"ts-node": "^10.4.0", | ||
"typedoc": "^0.22.10", | ||
"typescript": "^4.5.4" | ||
"typedoc": "^0.22.11", | ||
"typescript": "^4.5.5" | ||
} | ||
} |
67084
1654