diff --git a/docs/README.md b/docs/README.md index b6924df5..11c633f5 100644 --- a/docs/README.md +++ b/docs/README.md @@ -32,6 +32,7 @@ redis-om - [SchemaDefinition](README.md#schemadefinition) - [SchemaOptions](README.md#schemaoptions) - [SearchDataStructure](README.md#searchdatastructure) +- [StopWordOptions](README.md#stopwordoptions) - [SubSearchFunction](README.md#subsearchfunction) ## Type aliases @@ -61,7 +62,7 @@ A constructor that creates an [Entity](classes/Entity.md) of type TEntity. #### Defined in -[lib/entity/entity.ts:10](https://github.com/redis/redis-om-node/blob/20e6b1d/lib/entity/entity.ts#L10) +[lib/entity/entity.ts:10](https://github.com/redis/redis-om-node/blob/609ec96/lib/entity/entity.ts#L10) ___ @@ -77,7 +78,7 @@ A JavaScript object containing the underlying data of an [Entity](classes/Entity #### Defined in -[lib/entity/entity.ts:4](https://github.com/redis/redis-om-node/blob/20e6b1d/lib/entity/entity.ts#L4) +[lib/entity/entity.ts:4](https://github.com/redis/redis-om-node/blob/609ec96/lib/entity/entity.ts#L4) ___ @@ -89,7 +90,7 @@ Contains instructions telling how to map a property on an [Entity](classes/Entit #### Defined in -[lib/schema/schema-definitions.ts:54](https://github.com/redis/redis-om-node/blob/20e6b1d/lib/schema/schema-definitions.ts#L54) +[lib/schema/schema-definitions.ts:54](https://github.com/redis/redis-om-node/blob/609ec96/lib/schema/schema-definitions.ts#L54) ___ @@ -109,7 +110,7 @@ A function that generates random [Entity IDs](classes/Entity.md#entityid). #### Defined in -[lib/schema/schema-definitions.ts:68](https://github.com/redis/redis-om-node/blob/20e6b1d/lib/schema/schema-definitions.ts#L68) +[lib/schema/schema-definitions.ts:68](https://github.com/redis/redis-om-node/blob/609ec96/lib/schema/schema-definitions.ts#L68) ___ @@ -128,7 +129,7 @@ contains a [FieldDefinition](README.md#fielddefinition) that tell Redis OM how t #### Defined in -[lib/schema/schema-definitions.ts:59](https://github.com/redis/redis-om-node/blob/20e6b1d/lib/schema/schema-definitions.ts#L59) +[lib/schema/schema-definitions.ts:59](https://github.com/redis/redis-om-node/blob/609ec96/lib/schema/schema-definitions.ts#L59) ___ @@ -146,10 +147,12 @@ Configuration options for a [Schema](classes/Schema.md). | `idStrategy?` | [`IdStrategy`](README.md#idstrategy) | A function that generates a random [Entity ID](classes/Entity.md#entityid). Defaults to a function that generates [ULIDs](https://github.com/ulid/spec). Combined with prefix to generate a Redis key. If prefix is `Foo` and idStratgey returns `12345` then the generated key would be `Foo:12345`. | | `indexName?` | `string` | The name used by RediSearch to store the index for this [Schema](classes/Schema.md). Defaults to prefix followed by `:index`. So, for a prefix of `Foo`, it would use `Foo:index`. | | `prefix?` | `string` | The string that comes before the ID when creating Redis keys for [Entities](classes/Entity.md). Defaults to the class name of the [Entity](classes/Entity.md). Combined with the results of idStrategy to generate a key. If prefix is `Foo` and idStrategy returns `12345` then the generated key would be `Foo:12345`. | +| `stopWords?` | `string`[] | Stop words to be used by this schema. If `useStopWords` is anything other than `CUSTOM`, this option is ignored. | +| `useStopWords?` | [`StopWordOptions`](README.md#stopwordoptions) | Configures the usage of stop words. Valid values are `OFF`, `DEFAULT`, and `CUSTOM`. Setting this to `OFF` disables all stop words. Setting this to `DEFAULT` uses the stop words intrinsic to RediSearch. Setting this to `CUSTOM` tells RediSearch to use the stop words in `stopWords`. | #### Defined in -[lib/schema/schema-options.ts:7](https://github.com/redis/redis-om-node/blob/20e6b1d/lib/schema/schema-options.ts#L7) +[lib/schema/schema-options.ts:7](https://github.com/redis/redis-om-node/blob/609ec96/lib/schema/schema-options.ts#L7) ___ @@ -161,7 +164,19 @@ The type of data structure in Redis to map objects to. #### Defined in -[lib/client.ts:21](https://github.com/redis/redis-om-node/blob/20e6b1d/lib/client.ts#L21) +[lib/client.ts:21](https://github.com/redis/redis-om-node/blob/609ec96/lib/client.ts#L21) + +___ + +### StopWordOptions + +Ƭ **StopWordOptions**: ``"OFF"`` \| ``"DEFAULT"`` \| ``"CUSTOM"`` + +Valid values for how to use stop words for a given [Schema](classes/Schema.md). + +#### Defined in + +[lib/schema/schema-definitions.ts:71](https://github.com/redis/redis-om-node/blob/609ec96/lib/schema/schema-definitions.ts#L71) ___ @@ -193,4 +208,4 @@ A function that takes a [Search](classes/Search.md) and returns a [Search](class #### Defined in -[lib/search/search.ts:21](https://github.com/redis/redis-om-node/blob/20e6b1d/lib/search/search.ts#L21) +[lib/search/search.ts:22](https://github.com/redis/redis-om-node/blob/609ec96/lib/search/search.ts#L22) diff --git a/docs/classes/Client.md b/docs/classes/Client.md index 1334bbb8..8074b1f0 100644 --- a/docs/classes/Client.md +++ b/docs/classes/Client.md @@ -47,7 +47,7 @@ Close the connection to Redis. #### Defined in -[lib/client.ts:79](https://github.com/redis/redis-om-node/blob/20e6b1d/lib/client.ts#L79) +[lib/client.ts:96](https://github.com/redis/redis-om-node/blob/609ec96/lib/client.ts#L96) ___ @@ -77,7 +77,7 @@ The raw results of calling the Redis command. #### Defined in -[lib/client.ts:56](https://github.com/redis/redis-om-node/blob/20e6b1d/lib/client.ts#L56) +[lib/client.ts:73](https://github.com/redis/redis-om-node/blob/609ec96/lib/client.ts#L73) ___ @@ -107,7 +107,7 @@ A repository for the provided schema. #### Defined in -[lib/client.ts:71](https://github.com/redis/redis-om-node/blob/20e6b1d/lib/client.ts#L71) +[lib/client.ts:88](https://github.com/redis/redis-om-node/blob/609ec96/lib/client.ts#L88) ___ @@ -129,4 +129,4 @@ Open a connection to Redis at the provided URL. #### Defined in -[lib/client.ts:43](https://github.com/redis/redis-om-node/blob/20e6b1d/lib/client.ts#L43) +[lib/client.ts:60](https://github.com/redis/redis-om-node/blob/609ec96/lib/client.ts#L60) diff --git a/docs/classes/Entity.md b/docs/classes/Entity.md index 0667390f..1c029984 100644 --- a/docs/classes/Entity.md +++ b/docs/classes/Entity.md @@ -25,4 +25,4 @@ The generated entity ID. #### Defined in -[lib/entity/entity.ts:22](https://github.com/redis/redis-om-node/blob/20e6b1d/lib/entity/entity.ts#L22) +[lib/entity/entity.ts:22](https://github.com/redis/redis-om-node/blob/609ec96/lib/entity/entity.ts#L22) diff --git a/docs/classes/RedisError.md b/docs/classes/RedisError.md index 00db2cda..56bf834f 100644 --- a/docs/classes/RedisError.md +++ b/docs/classes/RedisError.md @@ -44,7 +44,7 @@ Error.constructor #### Defined in -[lib/errors.ts:2](https://github.com/redis/redis-om-node/blob/20e6b1d/lib/errors.ts#L2) +[lib/errors.ts:2](https://github.com/redis/redis-om-node/blob/609ec96/lib/errors.ts#L2) ## Properties @@ -58,7 +58,7 @@ Error.message #### Defined in -node_modules/typescript/lib/lib.es5.d.ts:974 +node_modules/typescript/lib/lib.es5.d.ts:1023 ___ @@ -72,7 +72,7 @@ Error.name #### Defined in -node_modules/typescript/lib/lib.es5.d.ts:973 +node_modules/typescript/lib/lib.es5.d.ts:1022 ___ @@ -86,7 +86,7 @@ Error.stack #### Defined in -node_modules/typescript/lib/lib.es5.d.ts:975 +node_modules/typescript/lib/lib.es5.d.ts:1024 ___ diff --git a/docs/classes/Repository.md b/docs/classes/Repository.md index c5c18924..b59e2409 100644 --- a/docs/classes/Repository.md +++ b/docs/classes/Repository.md @@ -82,7 +82,7 @@ Constructs a new Repository. #### Defined in -[lib/repository/repository.ts:60](https://github.com/redis/redis-om-node/blob/20e6b1d/lib/repository/repository.ts#L60) +[lib/repository/repository.ts:60](https://github.com/redis/redis-om-node/blob/609ec96/lib/repository/repository.ts#L60) ## Methods @@ -100,7 +100,7 @@ A newly created Entity. #### Defined in -[lib/repository/repository.ts:100](https://github.com/redis/redis-om-node/blob/20e6b1d/lib/repository/repository.ts#L100) +[lib/repository/repository.ts:106](https://github.com/redis/redis-om-node/blob/609ec96/lib/repository/repository.ts#L106) ___ @@ -117,7 +117,7 @@ that RediSearch or RedisJSON is installed on your instance of Redis. #### Defined in -[lib/repository/repository.ts:71](https://github.com/redis/redis-om-node/blob/20e6b1d/lib/repository/repository.ts#L71) +[lib/repository/repository.ts:71](https://github.com/redis/redis-om-node/blob/609ec96/lib/repository/repository.ts#L71) ___ @@ -135,7 +135,7 @@ on your instance of Redis. #### Defined in -[lib/repository/repository.ts:84](https://github.com/redis/redis-om-node/blob/20e6b1d/lib/repository/repository.ts#L84) +[lib/repository/repository.ts:90](https://github.com/redis/redis-om-node/blob/609ec96/lib/repository/repository.ts#L90) ___ @@ -161,7 +161,7 @@ The matching Entity. #### Defined in -[lib/repository/repository.ts:138](https://github.com/redis/redis-om-node/blob/20e6b1d/lib/repository/repository.ts#L138) +[lib/repository/repository.ts:144](https://github.com/redis/redis-om-node/blob/609ec96/lib/repository/repository.ts#L144) ___ @@ -184,7 +184,7 @@ not found, does nothing. #### Defined in -[lib/repository/repository.ts:159](https://github.com/redis/redis-om-node/blob/20e6b1d/lib/repository/repository.ts#L159) +[lib/repository/repository.ts:165](https://github.com/redis/redis-om-node/blob/609ec96/lib/repository/repository.ts#L165) ___ @@ -209,7 +209,7 @@ The ID of the Entity just saved. #### Defined in -[lib/repository/repository.ts:111](https://github.com/redis/redis-om-node/blob/20e6b1d/lib/repository/repository.ts#L111) +[lib/repository/repository.ts:117](https://github.com/redis/redis-om-node/blob/609ec96/lib/repository/repository.ts#L117) ___ @@ -228,4 +228,4 @@ A [Search](Search.md) object. #### Defined in -[lib/repository/repository.ts:170](https://github.com/redis/redis-om-node/blob/20e6b1d/lib/repository/repository.ts#L170) +[lib/repository/repository.ts:176](https://github.com/redis/redis-om-node/blob/609ec96/lib/repository/repository.ts#L176) diff --git a/docs/classes/Schema.md b/docs/classes/Schema.md index 5a872dd8..cc80781f 100644 --- a/docs/classes/Schema.md +++ b/docs/classes/Schema.md @@ -37,6 +37,8 @@ its constructor. - [dataStructure](Schema.md#datastructure) - [indexName](Schema.md#indexname) - [prefix](Schema.md#prefix) +- [stopWords](Schema.md#stopwords) +- [useStopWords](Schema.md#usestopwords) ### Methods @@ -64,7 +66,7 @@ its constructor. #### Defined in -[lib/schema/schema.ts:53](https://github.com/redis/redis-om-node/blob/20e6b1d/lib/schema/schema.ts#L53) +[lib/schema/schema.ts:53](https://github.com/redis/redis-om-node/blob/609ec96/lib/schema/schema.ts#L53) ## Accessors @@ -81,7 +83,7 @@ that this Schema uses to store [Entities](Entity.md) in Redis. #### Defined in -[lib/schema/schema.ts:72](https://github.com/redis/redis-om-node/blob/20e6b1d/lib/schema/schema.ts#L72) +[lib/schema/schema.ts:72](https://github.com/redis/redis-om-node/blob/609ec96/lib/schema/schema.ts#L72) ___ @@ -97,7 +99,7 @@ The configured name for the RediSearch index for this Schema. #### Defined in -[lib/schema/schema.ts:66](https://github.com/redis/redis-om-node/blob/20e6b1d/lib/schema/schema.ts#L66) +[lib/schema/schema.ts:66](https://github.com/redis/redis-om-node/blob/609ec96/lib/schema/schema.ts#L66) ___ @@ -113,7 +115,42 @@ The configured keyspace prefix in Redis for this Schema. #### Defined in -[lib/schema/schema.ts:63](https://github.com/redis/redis-om-node/blob/20e6b1d/lib/schema/schema.ts#L63) +[lib/schema/schema.ts:63](https://github.com/redis/redis-om-node/blob/609ec96/lib/schema/schema.ts#L63) + +___ + +### stopWords + +• `get` **stopWords**(): `string`[] + +The configured stop words. Ignored if [Schema.useStopWords](Schema.md#usestopwords) is anything other +than `CUSTOM`. + +#### Returns + +`string`[] + +#### Defined in + +[lib/schema/schema.ts:85](https://github.com/redis/redis-om-node/blob/609ec96/lib/schema/schema.ts#L85) + +___ + +### useStopWords + +• `get` **useStopWords**(): [`StopWordOptions`](../README.md#stopwordoptions) + +The configured usage of stop words, a string with the value of either `OFF`, `DEFAULT`, +or `CUSTOM`. See {@link SchemaOptions.useStopWords} and {@link SchemaOptions.stopWords} +for more details. + +#### Returns + +[`StopWordOptions`](../README.md#stopwordoptions) + +#### Defined in + +[lib/schema/schema.ts:79](https://github.com/redis/redis-om-node/blob/609ec96/lib/schema/schema.ts#L79) ## Methods @@ -129,4 +166,4 @@ Generates a unique string using the configured [IdStrategy](../README.md#idstrat #### Defined in -[lib/schema/schema.ts:81](https://github.com/redis/redis-om-node/blob/20e6b1d/lib/schema/schema.ts#L81) +[lib/schema/schema.ts:94](https://github.com/redis/redis-om-node/blob/609ec96/lib/schema/schema.ts#L94) diff --git a/docs/classes/Search.md b/docs/classes/Search.md index 49076923..d6a27eba 100644 --- a/docs/classes/Search.md +++ b/docs/classes/Search.md @@ -43,7 +43,7 @@ A subclass of [WhereField](WhereField.md) matching the type of the field. #### Defined in -[lib/search/search.ts:124](https://github.com/redis/redis-om-node/blob/20e6b1d/lib/search/search.ts#L124) +[lib/search/search.ts:125](https://github.com/redis/redis-om-node/blob/609ec96/lib/search/search.ts#L125) ▸ **and**(`subSearchFn`): [`Search`](Search.md)<`TEntity`\> @@ -63,7 +63,7 @@ Sets up a nested search as a logical AND. #### Defined in -[lib/search/search.ts:131](https://github.com/redis/redis-om-node/blob/20e6b1d/lib/search/search.ts#L131) +[lib/search/search.ts:132](https://github.com/redis/redis-om-node/blob/609ec96/lib/search/search.ts#L132) ___ @@ -79,7 +79,7 @@ Returns the number of [Entities](Entity.md) that match this query. #### Defined in -[lib/search/search.ts:51](https://github.com/redis/redis-om-node/blob/20e6b1d/lib/search/search.ts#L51) +[lib/search/search.ts:52](https://github.com/redis/redis-om-node/blob/609ec96/lib/search/search.ts#L52) ___ @@ -103,7 +103,7 @@ A subclass of [WhereField](WhereField.md) matching the type of the field. #### Defined in -[lib/search/search.ts:141](https://github.com/redis/redis-om-node/blob/20e6b1d/lib/search/search.ts#L141) +[lib/search/search.ts:142](https://github.com/redis/redis-om-node/blob/609ec96/lib/search/search.ts#L142) ▸ **or**(`subSearchFn`): [`Search`](Search.md)<`TEntity`\> @@ -123,13 +123,13 @@ Sets up a nested search as a logical OR. #### Defined in -[lib/search/search.ts:148](https://github.com/redis/redis-om-node/blob/20e6b1d/lib/search/search.ts#L148) +[lib/search/search.ts:149](https://github.com/redis/redis-om-node/blob/609ec96/lib/search/search.ts#L149) ___ ### return -▸ **return**(`offset`, `pageSize`): `Promise`<`TEntity`[]\> +▸ **return**(`offset`, `count`): `Promise`<`TEntity`[]\> Returns a page of [Entities](Entity.md) that match this query. @@ -138,7 +138,7 @@ Returns a page of [Entities](Entity.md) that match this query. | Name | Type | Description | | :------ | :------ | :------ | | `offset` | `number` | The offset for where to start returning [Entities](Entity.md). | -| `pageSize` | `number` | The number of [Entities](Entity.md) to return. | +| `count` | `number` | - | #### Returns @@ -148,7 +148,7 @@ An array of [Entities](Entity.md) matching the query. #### Defined in -[lib/search/search.ts:64](https://github.com/redis/redis-om-node/blob/20e6b1d/lib/search/search.ts#L64) +[lib/search/search.ts:65](https://github.com/redis/redis-om-node/blob/609ec96/lib/search/search.ts#L65) ___ @@ -180,7 +180,7 @@ An array of [Entities](Entity.md) matching the query. #### Defined in -[lib/search/search.ts:85](https://github.com/redis/redis-om-node/blob/20e6b1d/lib/search/search.ts#L85) +[lib/search/search.ts:86](https://github.com/redis/redis-om-node/blob/609ec96/lib/search/search.ts#L86) ___ @@ -205,7 +205,7 @@ A subclass of [WhereField](WhereField.md) matching the type of the field. #### Defined in -[lib/search/search.ts:106](https://github.com/redis/redis-om-node/blob/20e6b1d/lib/search/search.ts#L106) +[lib/search/search.ts:107](https://github.com/redis/redis-om-node/blob/609ec96/lib/search/search.ts#L107) ▸ **where**(`subSearchFn`): [`Search`](Search.md)<`TEntity`\> @@ -226,4 +226,4 @@ they are treated logically as AND. #### Defined in -[lib/search/search.ts:114](https://github.com/redis/redis-om-node/blob/20e6b1d/lib/search/search.ts#L114) +[lib/search/search.ts:115](https://github.com/redis/redis-om-node/blob/609ec96/lib/search/search.ts#L115) diff --git a/docs/classes/Where.md b/docs/classes/Where.md index f97bf5c1..f0f94d38 100644 --- a/docs/classes/Where.md +++ b/docs/classes/Where.md @@ -40,4 +40,4 @@ Converts this [Where](Where.md) into a portion of a RediSearch query. #### Defined in -[lib/search/where.ts:8](https://github.com/redis/redis-om-node/blob/20e6b1d/lib/search/where.ts#L8) +[lib/search/where.ts:8](https://github.com/redis/redis-om-node/blob/609ec96/lib/search/where.ts#L8) diff --git a/docs/classes/WhereField.md b/docs/classes/WhereField.md index a9a4203d..45967037 100644 --- a/docs/classes/WhereField.md +++ b/docs/classes/WhereField.md @@ -72,7 +72,7 @@ this multiple times will have no effect. #### Defined in -[lib/search/where-field.ts:79](https://github.com/redis/redis-om-node/blob/20e6b1d/lib/search/where-field.ts#L79) +[lib/search/where-field.ts:79](https://github.com/redis/redis-om-node/blob/609ec96/lib/search/where-field.ts#L79) ___ @@ -87,7 +87,7 @@ this multiple times will have no effect. #### Defined in -[lib/search/where-field.ts:86](https://github.com/redis/redis-om-node/blob/20e6b1d/lib/search/where-field.ts#L86) +[lib/search/where-field.ts:86](https://github.com/redis/redis-om-node/blob/609ec96/lib/search/where-field.ts#L86) ## Accessors @@ -105,7 +105,7 @@ this #### Defined in -[lib/search/where-field.ts:227](https://github.com/redis/redis-om-node/blob/20e6b1d/lib/search/where-field.ts#L227) +[lib/search/where-field.ts:227](https://github.com/redis/redis-om-node/blob/609ec96/lib/search/where-field.ts#L227) ___ @@ -123,7 +123,7 @@ this #### Defined in -[lib/search/where-field.ts:219](https://github.com/redis/redis-om-node/blob/20e6b1d/lib/search/where-field.ts#L219) +[lib/search/where-field.ts:219](https://github.com/redis/redis-om-node/blob/609ec96/lib/search/where-field.ts#L219) ___ @@ -142,7 +142,7 @@ this #### Defined in -[lib/search/where-field.ts:236](https://github.com/redis/redis-om-node/blob/20e6b1d/lib/search/where-field.ts#L236) +[lib/search/where-field.ts:236](https://github.com/redis/redis-om-node/blob/609ec96/lib/search/where-field.ts#L236) ## Methods @@ -167,7 +167,7 @@ The [Search](Search.md) that was called to create this [WhereField](WhereField.m #### Defined in -[lib/search/where-field.ts:162](https://github.com/redis/redis-om-node/blob/20e6b1d/lib/search/where-field.ts#L162) +[lib/search/where-field.ts:162](https://github.com/redis/redis-om-node/blob/609ec96/lib/search/where-field.ts#L162) ___ @@ -191,7 +191,7 @@ The [Search](Search.md) that was called to create this [WhereField](WhereField.m #### Defined in -[lib/search/where-field.ts:169](https://github.com/redis/redis-om-node/blob/20e6b1d/lib/search/where-field.ts#L169) +[lib/search/where-field.ts:169](https://github.com/redis/redis-om-node/blob/609ec96/lib/search/where-field.ts#L169) ___ @@ -216,7 +216,7 @@ The [Search](Search.md) that was called to create this [WhereField](WhereField.m #### Defined in -[lib/search/where-field.ts:184](https://github.com/redis/redis-om-node/blob/20e6b1d/lib/search/where-field.ts#L184) +[lib/search/where-field.ts:184](https://github.com/redis/redis-om-node/blob/609ec96/lib/search/where-field.ts#L184) ___ @@ -240,7 +240,7 @@ The [Search](Search.md) that was called to create this [WhereField](WhereField.m #### Defined in -[lib/search/where-field.ts:176](https://github.com/redis/redis-om-node/blob/20e6b1d/lib/search/where-field.ts#L176) +[lib/search/where-field.ts:176](https://github.com/redis/redis-om-node/blob/609ec96/lib/search/where-field.ts#L176) ___ @@ -265,7 +265,7 @@ The [Search](Search.md) that was called to create this [WhereField](WhereField.m #### Defined in -[lib/search/where-field.ts:192](https://github.com/redis/redis-om-node/blob/20e6b1d/lib/search/where-field.ts#L192) +[lib/search/where-field.ts:192](https://github.com/redis/redis-om-node/blob/609ec96/lib/search/where-field.ts#L192) ___ @@ -289,7 +289,7 @@ The [Search](Search.md) that was called to create this [WhereField](WhereField.m #### Defined in -[lib/search/where-field.ts:16](https://github.com/redis/redis-om-node/blob/20e6b1d/lib/search/where-field.ts#L16) +[lib/search/where-field.ts:16](https://github.com/redis/redis-om-node/blob/609ec96/lib/search/where-field.ts#L16) ___ @@ -313,7 +313,7 @@ The [Search](Search.md) that was called to create this [WhereField](WhereField.m #### Defined in -[lib/search/where-field.ts:23](https://github.com/redis/redis-om-node/blob/20e6b1d/lib/search/where-field.ts#L23) +[lib/search/where-field.ts:23](https://github.com/redis/redis-om-node/blob/609ec96/lib/search/where-field.ts#L23) ___ @@ -337,7 +337,7 @@ The [Search](Search.md) that was called to create this [WhereField](WhereField.m #### Defined in -[lib/search/where-field.ts:37](https://github.com/redis/redis-om-node/blob/20e6b1d/lib/search/where-field.ts#L37) +[lib/search/where-field.ts:37](https://github.com/redis/redis-om-node/blob/609ec96/lib/search/where-field.ts#L37) ___ @@ -361,7 +361,7 @@ The [Search](Search.md) that was called to create this [WhereField](WhereField.m #### Defined in -[lib/search/where-field.ts:30](https://github.com/redis/redis-om-node/blob/20e6b1d/lib/search/where-field.ts#L30) +[lib/search/where-field.ts:30](https://github.com/redis/redis-om-node/blob/609ec96/lib/search/where-field.ts#L30) ___ @@ -379,7 +379,7 @@ The [Search](Search.md) that was called to create this [WhereField](WhereField.m #### Defined in -[lib/search/where-field.ts:98](https://github.com/redis/redis-om-node/blob/20e6b1d/lib/search/where-field.ts#L98) +[lib/search/where-field.ts:98](https://github.com/redis/redis-om-node/blob/609ec96/lib/search/where-field.ts#L98) ___ @@ -403,7 +403,7 @@ The [Search](Search.md) that was called to create this [WhereField](WhereField.m #### Defined in -[lib/search/where-field.ts:112](https://github.com/redis/redis-om-node/blob/20e6b1d/lib/search/where-field.ts#L112) +[lib/search/where-field.ts:112](https://github.com/redis/redis-om-node/blob/609ec96/lib/search/where-field.ts#L112) ___ @@ -427,7 +427,7 @@ The [Search](Search.md) that was called to create this [WhereField](WhereField.m #### Defined in -[lib/search/where-field.ts:126](https://github.com/redis/redis-om-node/blob/20e6b1d/lib/search/where-field.ts#L126) +[lib/search/where-field.ts:126](https://github.com/redis/redis-om-node/blob/609ec96/lib/search/where-field.ts#L126) ___ @@ -451,7 +451,7 @@ The [Search](Search.md) that was called to create this [WhereField](WhereField.m #### Defined in -[lib/search/where-field.ts:105](https://github.com/redis/redis-om-node/blob/20e6b1d/lib/search/where-field.ts#L105) +[lib/search/where-field.ts:105](https://github.com/redis/redis-om-node/blob/609ec96/lib/search/where-field.ts#L105) ___ @@ -475,7 +475,7 @@ The [Search](Search.md) that was called to create this [WhereField](WhereField.m #### Defined in -[lib/search/where-field.ts:119](https://github.com/redis/redis-om-node/blob/20e6b1d/lib/search/where-field.ts#L119) +[lib/search/where-field.ts:119](https://github.com/redis/redis-om-node/blob/609ec96/lib/search/where-field.ts#L119) ___ @@ -499,7 +499,7 @@ The [Search](Search.md) that was called to create this [WhereField](WhereField.m #### Defined in -[lib/search/where-field.ts:140](https://github.com/redis/redis-om-node/blob/20e6b1d/lib/search/where-field.ts#L140) +[lib/search/where-field.ts:140](https://github.com/redis/redis-om-node/blob/609ec96/lib/search/where-field.ts#L140) ___ @@ -523,7 +523,7 @@ The [Search](Search.md) that was called to create this [WhereField](WhereField.m #### Defined in -[lib/search/where-field.ts:154](https://github.com/redis/redis-om-node/blob/20e6b1d/lib/search/where-field.ts#L154) +[lib/search/where-field.ts:154](https://github.com/redis/redis-om-node/blob/609ec96/lib/search/where-field.ts#L154) ___ @@ -547,7 +547,7 @@ The [Search](Search.md) that was called to create this [WhereField](WhereField.m #### Defined in -[lib/search/where-field.ts:133](https://github.com/redis/redis-om-node/blob/20e6b1d/lib/search/where-field.ts#L133) +[lib/search/where-field.ts:133](https://github.com/redis/redis-om-node/blob/609ec96/lib/search/where-field.ts#L133) ___ @@ -571,7 +571,7 @@ The [Search](Search.md) that was called to create this [WhereField](WhereField.m #### Defined in -[lib/search/where-field.ts:147](https://github.com/redis/redis-om-node/blob/20e6b1d/lib/search/where-field.ts#L147) +[lib/search/where-field.ts:147](https://github.com/redis/redis-om-node/blob/609ec96/lib/search/where-field.ts#L147) ___ @@ -595,7 +595,7 @@ The [Search](Search.md) that was called to create this [WhereField](WhereField.m #### Defined in -[lib/search/where-field.ts:44](https://github.com/redis/redis-om-node/blob/20e6b1d/lib/search/where-field.ts#L44) +[lib/search/where-field.ts:44](https://github.com/redis/redis-om-node/blob/609ec96/lib/search/where-field.ts#L44) ___ @@ -619,7 +619,7 @@ The [Search](Search.md) that was called to create this [WhereField](WhereField.m #### Defined in -[lib/search/where-field.ts:58](https://github.com/redis/redis-om-node/blob/20e6b1d/lib/search/where-field.ts#L58) +[lib/search/where-field.ts:58](https://github.com/redis/redis-om-node/blob/609ec96/lib/search/where-field.ts#L58) ___ @@ -643,7 +643,7 @@ The [Search](Search.md) that was called to create this [WhereField](WhereField.m #### Defined in -[lib/search/where-field.ts:65](https://github.com/redis/redis-om-node/blob/20e6b1d/lib/search/where-field.ts#L65) +[lib/search/where-field.ts:65](https://github.com/redis/redis-om-node/blob/609ec96/lib/search/where-field.ts#L65) ___ @@ -667,7 +667,7 @@ The [Search](Search.md) that was called to create this [WhereField](WhereField.m #### Defined in -[lib/search/where-field.ts:51](https://github.com/redis/redis-om-node/blob/20e6b1d/lib/search/where-field.ts#L51) +[lib/search/where-field.ts:51](https://github.com/redis/redis-om-node/blob/609ec96/lib/search/where-field.ts#L51) ___ @@ -691,7 +691,7 @@ The [Search](Search.md) that was called to create this [WhereField](WhereField.m #### Defined in -[lib/search/where-field.ts:72](https://github.com/redis/redis-om-node/blob/20e6b1d/lib/search/where-field.ts#L72) +[lib/search/where-field.ts:72](https://github.com/redis/redis-om-node/blob/609ec96/lib/search/where-field.ts#L72) ___ @@ -711,7 +711,7 @@ Converts this [Where](Where.md) into a portion of a RediSearch query. #### Defined in -[lib/search/where-field.ts:241](https://github.com/redis/redis-om-node/blob/20e6b1d/lib/search/where-field.ts#L241) +[lib/search/where-field.ts:241](https://github.com/redis/redis-om-node/blob/609ec96/lib/search/where-field.ts#L241) ___ @@ -729,4 +729,4 @@ The [Search](Search.md) that was called to create this [WhereField](WhereField.m #### Defined in -[lib/search/where-field.ts:92](https://github.com/redis/redis-om-node/blob/20e6b1d/lib/search/where-field.ts#L92) +[lib/search/where-field.ts:92](https://github.com/redis/redis-om-node/blob/609ec96/lib/search/where-field.ts#L92) diff --git a/docs/interfaces/ArrayField.md b/docs/interfaces/ArrayField.md index bee876fa..1ee6f52f 100644 --- a/docs/interfaces/ArrayField.md +++ b/docs/interfaces/ArrayField.md @@ -33,7 +33,7 @@ The default field name in Redis is the key name defined in the #### Defined in -[lib/schema/schema-definitions.ts:7](https://github.com/redis/redis-om-node/blob/20e6b1d/lib/schema/schema-definitions.ts#L7) +[lib/schema/schema-definitions.ts:7](https://github.com/redis/redis-om-node/blob/609ec96/lib/schema/schema-definitions.ts#L7) ___ @@ -48,7 +48,7 @@ here to avoid those problems. Defaults to `|`. #### Defined in -[lib/schema/schema-definitions.ts:50](https://github.com/redis/redis-om-node/blob/20e6b1d/lib/schema/schema-definitions.ts#L50) +[lib/schema/schema-definitions.ts:50](https://github.com/redis/redis-om-node/blob/609ec96/lib/schema/schema-definitions.ts#L50) ___ @@ -60,4 +60,4 @@ Yep. It's an array. #### Defined in -[lib/schema/schema-definitions.ts:42](https://github.com/redis/redis-om-node/blob/20e6b1d/lib/schema/schema-definitions.ts#L42) +[lib/schema/schema-definitions.ts:42](https://github.com/redis/redis-om-node/blob/609ec96/lib/schema/schema-definitions.ts#L42) diff --git a/docs/interfaces/BooleanField.md b/docs/interfaces/BooleanField.md index e13fa60c..ff2bd487 100644 --- a/docs/interfaces/BooleanField.md +++ b/docs/interfaces/BooleanField.md @@ -32,7 +32,7 @@ The default field name in Redis is the key name defined in the #### Defined in -[lib/schema/schema-definitions.ts:7](https://github.com/redis/redis-om-node/blob/20e6b1d/lib/schema/schema-definitions.ts#L7) +[lib/schema/schema-definitions.ts:7](https://github.com/redis/redis-om-node/blob/609ec96/lib/schema/schema-definitions.ts#L7) ___ @@ -44,4 +44,4 @@ Yep. It's a boolean. #### Defined in -[lib/schema/schema-definitions.ts:36](https://github.com/redis/redis-om-node/blob/20e6b1d/lib/schema/schema-definitions.ts#L36) +[lib/schema/schema-definitions.ts:36](https://github.com/redis/redis-om-node/blob/609ec96/lib/schema/schema-definitions.ts#L36) diff --git a/docs/interfaces/Field.md b/docs/interfaces/Field.md index dcaef5e2..ce1efcfc 100644 --- a/docs/interfaces/Field.md +++ b/docs/interfaces/Field.md @@ -33,4 +33,4 @@ The default field name in Redis is the key name defined in the #### Defined in -[lib/schema/schema-definitions.ts:7](https://github.com/redis/redis-om-node/blob/20e6b1d/lib/schema/schema-definitions.ts#L7) +[lib/schema/schema-definitions.ts:7](https://github.com/redis/redis-om-node/blob/609ec96/lib/schema/schema-definitions.ts#L7) diff --git a/docs/interfaces/NumericField.md b/docs/interfaces/NumericField.md index ee60f505..f43fa815 100644 --- a/docs/interfaces/NumericField.md +++ b/docs/interfaces/NumericField.md @@ -32,7 +32,7 @@ The default field name in Redis is the key name defined in the #### Defined in -[lib/schema/schema-definitions.ts:7](https://github.com/redis/redis-om-node/blob/20e6b1d/lib/schema/schema-definitions.ts#L7) +[lib/schema/schema-definitions.ts:7](https://github.com/redis/redis-om-node/blob/609ec96/lib/schema/schema-definitions.ts#L7) ___ @@ -44,4 +44,4 @@ Yep. It's a number. #### Defined in -[lib/schema/schema-definitions.ts:13](https://github.com/redis/redis-om-node/blob/20e6b1d/lib/schema/schema-definitions.ts#L13) +[lib/schema/schema-definitions.ts:13](https://github.com/redis/redis-om-node/blob/609ec96/lib/schema/schema-definitions.ts#L13) diff --git a/docs/interfaces/StringField.md b/docs/interfaces/StringField.md index 40d3a537..4ccfbc2e 100644 --- a/docs/interfaces/StringField.md +++ b/docs/interfaces/StringField.md @@ -34,7 +34,7 @@ The default field name in Redis is the key name defined in the #### Defined in -[lib/schema/schema-definitions.ts:7](https://github.com/redis/redis-om-node/blob/20e6b1d/lib/schema/schema-definitions.ts#L7) +[lib/schema/schema-definitions.ts:7](https://github.com/redis/redis-om-node/blob/609ec96/lib/schema/schema-definitions.ts#L7) ___ @@ -49,7 +49,7 @@ here to avoid those problems. Defaults to `|`. #### Defined in -[lib/schema/schema-definitions.ts:30](https://github.com/redis/redis-om-node/blob/20e6b1d/lib/schema/schema-definitions.ts#L30) +[lib/schema/schema-definitions.ts:30](https://github.com/redis/redis-om-node/blob/609ec96/lib/schema/schema-definitions.ts#L30) ___ @@ -61,7 +61,7 @@ Enables full-text search on this field when set to `true`. Defaults to `false`. #### Defined in -[lib/schema/schema-definitions.ts:22](https://github.com/redis/redis-om-node/blob/20e6b1d/lib/schema/schema-definitions.ts#L22) +[lib/schema/schema-definitions.ts:22](https://github.com/redis/redis-om-node/blob/609ec96/lib/schema/schema-definitions.ts#L22) ___ @@ -73,4 +73,4 @@ Yep. It's a string. #### Defined in -[lib/schema/schema-definitions.ts:19](https://github.com/redis/redis-om-node/blob/20e6b1d/lib/schema/schema-definitions.ts#L19) +[lib/schema/schema-definitions.ts:19](https://github.com/redis/redis-om-node/blob/609ec96/lib/schema/schema-definitions.ts#L19) diff --git a/lib/index.ts b/lib/index.ts index 3fafde61..dd511f60 100644 --- a/lib/index.ts +++ b/lib/index.ts @@ -4,16 +4,11 @@ import RedisError from "./errors"; import Repository from "./repository/repository"; import Schema from "./schema/schema"; import { SchemaDefinition, FieldDefinition, Field, NumericField, StringField, BooleanField, ArrayField, - IdStrategy } from "./schema/schema-definitions"; + IdStrategy, StopWordOptions } from "./schema/schema-definitions"; import { SchemaOptions } from "./schema/schema-options"; import Search, { SubSearchFunction } from "./search/search"; import Where from "./search/where"; import WhereField from "./search/where-field"; -import WhereArray from './search/where-array'; -import { WhereBoolean, WhereHashBoolean, WhereJsonBoolean } from './search/where-boolean'; -import WhereNumber from './search/where-number'; -import WhereString from './search/where-string'; -import WhereText from './search/where-text'; export { @@ -22,10 +17,7 @@ export { RedisError, Repository, Schema, SchemaDefinition, SchemaOptions, - FieldDefinition, Field, NumericField, StringField, BooleanField, ArrayField, IdStrategy, + FieldDefinition, Field, NumericField, StringField, BooleanField, ArrayField, IdStrategy, StopWordOptions, Search, SubSearchFunction, - Where, WhereField, - // WhereArray, - // WhereBoolean, WhereHashBoolean, WhereJsonBoolean, - // WhereNumber, WhereString, WhereText + Where, WhereField }; diff --git a/lib/schema/schema-definitions.ts b/lib/schema/schema-definitions.ts index 3ee311e2..602b283f 100644 --- a/lib/schema/schema-definitions.ts +++ b/lib/schema/schema-definitions.ts @@ -66,3 +66,6 @@ export type SchemaDefinition = { /** A function that generates random {@link Entity.entityId | Entity IDs}. */ export type IdStrategy = () => string; + +/** Valid values for how to use stop words for a given {@link Schema}. */ +export type StopWordOptions = 'OFF' | 'DEFAULT' | 'CUSTOM'; diff --git a/lib/schema/schema-options.ts b/lib/schema/schema-options.ts index 11b13575..46719fd7 100644 --- a/lib/schema/schema-options.ts +++ b/lib/schema/schema-options.ts @@ -1,10 +1,5 @@ import { SearchDataStructure } from "../client"; -import { IdStrategy } from "./schema-definitions"; - -/** - * Valid values for how to use stop words for a given schema. - */ -export type StopWordOptions = "OFF" | "DEFAULT" | "CUSTOM"; +import { IdStrategy, StopWordOptions } from "./schema-definitions"; /** * Configuration options for a {@link Schema}. @@ -38,14 +33,14 @@ export type SchemaOptions = { /** * Configures the usage of stop words. Valid values are `OFF`, `DEFAULT`, and `CUSTOM`. - * Setting this of `OFF` disables all stop words. Setting this to `DEFAULT` uses the + * Setting this to `OFF` disables all stop words. Setting this to `DEFAULT` uses the * stop words intrinsic to RediSearch. Setting this to `CUSTOM` tells RediSearch to - * use the stop words in {@link SchemaOptions.stopWords}. + * use the stop words in `stopWords`. */ useStopWords?: StopWordOptions; /** - * Stop words to be used by this schema. If {@link SchemaOptions.useStopWords} is + * Stop words to be used by this schema. If `useStopWords` is * anything other than `CUSTOM`, this option is ignored. */ stopWords?: string[] diff --git a/lib/schema/schema.ts b/lib/schema/schema.ts index 7d872bba..3876cf53 100644 --- a/lib/schema/schema.ts +++ b/lib/schema/schema.ts @@ -5,8 +5,8 @@ import Entity from "../entity/entity"; import { EntityConstructor } from '../entity/entity'; import SchemaBuilder from './schema-builder'; -import { FieldDefinition, IdStrategy, SchemaDefinition } from './schema-definitions'; -import { SchemaOptions, StopWordOptions } from './schema-options'; +import { FieldDefinition, IdStrategy, SchemaDefinition, StopWordOptions } from './schema-definitions'; +import { SchemaOptions } from './schema-options'; /** * Defines a schema that determines how an {@link Entity} is mapped to Redis diff --git a/package.json b/package.json index 7ee7692a..1b42616e 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,8 @@ "types": "./dist/index.d.ts", "files": [ "README.md", + "CHANGELOG", + "LICENSE", "logo.svg", "dist/**/*", "docs/**/*" ],