redis-type-os 1.0.3

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.
@@ -0,0 +1,915 @@
1
+ [redis-om](../README.md) / WhereField
2
+
3
+ # Class: WhereField
4
+
5
+ Abstract base class that all fields you want to filter
6
+ with extend. When you call [where](Search.md#where), a
7
+ subclass of this is returned.
8
+
9
+ ## Hierarchy
10
+
11
+ - [`Where`](Where.md)
12
+
13
+ ↳ **`WhereField`**
14
+
15
+ ## Table of contents
16
+
17
+ ### Properties
18
+
19
+ - [exact](WhereField.md#exact)
20
+ - [exactly](WhereField.md#exactly)
21
+
22
+ ### Accessors
23
+
24
+ - [does](WhereField.md#does)
25
+ - [is](WhereField.md#is)
26
+ - [not](WhereField.md#not)
27
+
28
+ ### Methods
29
+
30
+ - [after](WhereField.md#after)
31
+ - [before](WhereField.md#before)
32
+ - [between](WhereField.md#between)
33
+ - [contain](WhereField.md#contain)
34
+ - [containOneOf](WhereField.md#containoneof)
35
+ - [contains](WhereField.md#contains)
36
+ - [containsOneOf](WhereField.md#containsoneof)
37
+ - [eq](WhereField.md#eq)
38
+ - [equal](WhereField.md#equal)
39
+ - [equalTo](WhereField.md#equalto)
40
+ - [equals](WhereField.md#equals)
41
+ - [false](WhereField.md#false)
42
+ - [greaterThan](WhereField.md#greaterthan)
43
+ - [greaterThanOrEqualTo](WhereField.md#greaterthanorequalto)
44
+ - [gt](WhereField.md#gt)
45
+ - [gte](WhereField.md#gte)
46
+ - [inCircle](WhereField.md#incircle)
47
+ - [inRadius](WhereField.md#inradius)
48
+ - [lessThan](WhereField.md#lessthan)
49
+ - [lessThanOrEqualTo](WhereField.md#lessthanorequalto)
50
+ - [lt](WhereField.md#lt)
51
+ - [lte](WhereField.md#lte)
52
+ - [match](WhereField.md#match)
53
+ - [matchExact](WhereField.md#matchexact)
54
+ - [matchExactly](WhereField.md#matchexactly)
55
+ - [matches](WhereField.md#matches)
56
+ - [matchesExactly](WhereField.md#matchesexactly)
57
+ - [on](WhereField.md#on)
58
+ - [onOrAfter](WhereField.md#onorafter)
59
+ - [onOrBefore](WhereField.md#onorbefore)
60
+ - [toString](WhereField.md#tostring)
61
+ - [true](WhereField.md#true)
62
+
63
+ ## Properties
64
+
65
+ ### exact
66
+
67
+ • `Readonly` **exact**: [`WhereField`](WhereField.md)
68
+
69
+ Makes a call to [match](WhereField.md#match) a [matchExact](WhereField.md#matchexact) call. Calling
70
+ this multiple times will have no effect.
71
+
72
+ #### Defined in
73
+
74
+ [lib/search/where-field.ts:96](https://github.com/redis/redis-om-node/blob/d8438f7/lib/search/where-field.ts#L96)
75
+
76
+ ___
77
+
78
+ ### exactly
79
+
80
+ • `Readonly` **exactly**: [`WhereField`](WhereField.md)
81
+
82
+ Makes a call to [match](WhereField.md#match) a [matchExact](WhereField.md#matchexact) call. Calling
83
+ this multiple times will have no effect.
84
+
85
+ #### Defined in
86
+
87
+ [lib/search/where-field.ts:103](https://github.com/redis/redis-om-node/blob/d8438f7/lib/search/where-field.ts#L103)
88
+
89
+ ## Accessors
90
+
91
+ ### does
92
+
93
+ • `get` **does**(): `this`
94
+
95
+ Returns the current instance. Syntactic sugar to make your code more fluent.
96
+
97
+ #### Returns
98
+
99
+ `this`
100
+
101
+ this
102
+
103
+ #### Defined in
104
+
105
+ [lib/search/where-field.ts:293](https://github.com/redis/redis-om-node/blob/d8438f7/lib/search/where-field.ts#L293)
106
+
107
+ ___
108
+
109
+ ### is
110
+
111
+ • `get` **is**(): `this`
112
+
113
+ Returns the current instance. Syntactic sugar to make your code more fluent.
114
+
115
+ #### Returns
116
+
117
+ `this`
118
+
119
+ this
120
+
121
+ #### Defined in
122
+
123
+ [lib/search/where-field.ts:285](https://github.com/redis/redis-om-node/blob/d8438f7/lib/search/where-field.ts#L285)
124
+
125
+ ___
126
+
127
+ ### not
128
+
129
+ • `get` **not**(): `this`
130
+
131
+ Negates the query on the field, cause it to match when the condition is
132
+ *not* met. Calling this multiple times will negate the negation.
133
+
134
+ #### Returns
135
+
136
+ `this`
137
+
138
+ this
139
+
140
+ #### Defined in
141
+
142
+ [lib/search/where-field.ts:302](https://github.com/redis/redis-om-node/blob/d8438f7/lib/search/where-field.ts#L302)
143
+
144
+ ## Methods
145
+
146
+ ### after
147
+
148
+ ▸ **after**(`value`): [`Search`](Search.md)
149
+
150
+ Add a search that matches all datetimes *after* the provided UTC datetime to the query.
151
+
152
+ #### Parameters
153
+
154
+ | Name | Type | Description |
155
+ | :------ | :------ | :------ |
156
+ | `value` | `string` \| `number` \| `Date` | The datetime to compare against. |
157
+
158
+ #### Returns
159
+
160
+ [`Search`](Search.md)
161
+
162
+ The [Search](Search.md) that was called to create this [WhereField](WhereField.md).
163
+
164
+ #### Defined in
165
+
166
+ [lib/search/where-field.ts:244](https://github.com/redis/redis-om-node/blob/d8438f7/lib/search/where-field.ts#L244)
167
+
168
+ ___
169
+
170
+ ### before
171
+
172
+ ▸ **before**(`value`): [`Search`](Search.md)
173
+
174
+ Add a search that matches all datetimes *before* the provided UTC datetime to the query.
175
+
176
+ #### Parameters
177
+
178
+ | Name | Type | Description |
179
+ | :------ | :------ | :------ |
180
+ | `value` | `string` \| `number` \| `Date` | The datetime to compare against. |
181
+
182
+ #### Returns
183
+
184
+ [`Search`](Search.md)
185
+
186
+ The [Search](Search.md) that was called to create this [WhereField](WhereField.md).
187
+
188
+ #### Defined in
189
+
190
+ [lib/search/where-field.ts:237](https://github.com/redis/redis-om-node/blob/d8438f7/lib/search/where-field.ts#L237)
191
+
192
+ ___
193
+
194
+ ### between
195
+
196
+ ▸ **between**(`lower`, `upper`): [`Search`](Search.md)
197
+
198
+ Adds an inclusive range comparison against a field to the search query.
199
+
200
+ #### Parameters
201
+
202
+ | Name | Type | Description |
203
+ | :------ | :------ | :------ |
204
+ | `lower` | `string` \| `number` \| `Date` | The lower bound of the range. |
205
+ | `upper` | `string` \| `number` \| `Date` | The upper bound of the range. |
206
+
207
+ #### Returns
208
+
209
+ [`Search`](Search.md)
210
+
211
+ The [Search](Search.md) that was called to create this [WhereField](WhereField.md).
212
+
213
+ #### Defined in
214
+
215
+ [lib/search/where-field.ts:179](https://github.com/redis/redis-om-node/blob/d8438f7/lib/search/where-field.ts#L179)
216
+
217
+ ___
218
+
219
+ ### contain
220
+
221
+ ▸ **contain**(`value`): [`Search`](Search.md)
222
+
223
+ Adds a whole-string match for a value within a string array to the search query.
224
+
225
+ #### Parameters
226
+
227
+ | Name | Type | Description |
228
+ | :------ | :------ | :------ |
229
+ | `value` | `string` | The string to be matched. |
230
+
231
+ #### Returns
232
+
233
+ [`Search`](Search.md)
234
+
235
+ The [Search](Search.md) that was called to create this [WhereField](WhereField.md).
236
+
237
+ #### Defined in
238
+
239
+ [lib/search/where-field.ts:186](https://github.com/redis/redis-om-node/blob/d8438f7/lib/search/where-field.ts#L186)
240
+
241
+ ___
242
+
243
+ ### containOneOf
244
+
245
+ ▸ **containOneOf**(`...value`): [`Search`](Search.md)
246
+
247
+ Adds a whole-string match against a string array to the query. If any of the provided
248
+ strings in `value` is matched in the array, this matched.
249
+
250
+ #### Parameters
251
+
252
+ | Name | Type | Description |
253
+ | :------ | :------ | :------ |
254
+ | `...value` | `string`[] | An array of strings that you want to match one of. |
255
+
256
+ #### Returns
257
+
258
+ [`Search`](Search.md)
259
+
260
+ The [Search](Search.md) that was called to create this [WhereField](WhereField.md).
261
+
262
+ #### Defined in
263
+
264
+ [lib/search/where-field.ts:201](https://github.com/redis/redis-om-node/blob/d8438f7/lib/search/where-field.ts#L201)
265
+
266
+ ___
267
+
268
+ ### contains
269
+
270
+ ▸ **contains**(`value`): [`Search`](Search.md)
271
+
272
+ Adds a whole-string match for a value within a string array to the search query.
273
+
274
+ #### Parameters
275
+
276
+ | Name | Type | Description |
277
+ | :------ | :------ | :------ |
278
+ | `value` | `string` | The string to be matched. |
279
+
280
+ #### Returns
281
+
282
+ [`Search`](Search.md)
283
+
284
+ The [Search](Search.md) that was called to create this [WhereField](WhereField.md).
285
+
286
+ #### Defined in
287
+
288
+ [lib/search/where-field.ts:193](https://github.com/redis/redis-om-node/blob/d8438f7/lib/search/where-field.ts#L193)
289
+
290
+ ___
291
+
292
+ ### containsOneOf
293
+
294
+ ▸ **containsOneOf**(`...value`): [`Search`](Search.md)
295
+
296
+ Adds a whole-string match against a string array to the query. If any of the provided
297
+ strings in `value` is matched in the array, this matched.
298
+
299
+ #### Parameters
300
+
301
+ | Name | Type | Description |
302
+ | :------ | :------ | :------ |
303
+ | `...value` | `string`[] | An array of strings that you want to match one of. |
304
+
305
+ #### Returns
306
+
307
+ [`Search`](Search.md)
308
+
309
+ The [Search](Search.md) that was called to create this [WhereField](WhereField.md).
310
+
311
+ #### Defined in
312
+
313
+ [lib/search/where-field.ts:209](https://github.com/redis/redis-om-node/blob/d8438f7/lib/search/where-field.ts#L209)
314
+
315
+ ___
316
+
317
+ ### eq
318
+
319
+ ▸ **eq**(`value`): [`Search`](Search.md)
320
+
321
+ Adds an equals comparison to the query.
322
+
323
+ NOTE: this function is not available for strings where full-text
324
+ search is enabled. In that scenario, use `.match`.
325
+
326
+ #### Parameters
327
+
328
+ | Name | Type | Description |
329
+ | :------ | :------ | :------ |
330
+ | `value` | `string` \| `number` \| `boolean` \| `Date` | The value to be compared |
331
+
332
+ #### Returns
333
+
334
+ [`Search`](Search.md)
335
+
336
+ The [Search](Search.md) that was called to create this [WhereField](WhereField.md).
337
+
338
+ #### Defined in
339
+
340
+ [lib/search/where-field.ts:20](https://github.com/redis/redis-om-node/blob/d8438f7/lib/search/where-field.ts#L20)
341
+
342
+ ___
343
+
344
+ ### equal
345
+
346
+ ▸ **equal**(`value`): [`Search`](Search.md)
347
+
348
+ Adds an equals comparison to the query.
349
+
350
+ NOTE: this function is not available for strings where full-text
351
+ search is enabled. In that scenario, use `.match`.
352
+
353
+ #### Parameters
354
+
355
+ | Name | Type | Description |
356
+ | :------ | :------ | :------ |
357
+ | `value` | `string` \| `number` \| `boolean` \| `Date` | The value to be compared |
358
+
359
+ #### Returns
360
+
361
+ [`Search`](Search.md)
362
+
363
+ The [Search](Search.md) that was called to create this [WhereField](WhereField.md).
364
+
365
+ #### Defined in
366
+
367
+ [lib/search/where-field.ts:30](https://github.com/redis/redis-om-node/blob/d8438f7/lib/search/where-field.ts#L30)
368
+
369
+ ___
370
+
371
+ ### equalTo
372
+
373
+ ▸ **equalTo**(`value`): [`Search`](Search.md)
374
+
375
+ Adds an equals comparison to the query.
376
+
377
+ NOTE: this function is not available for strings where full-text
378
+ search is enabled. In that scenario, use `.match`.
379
+
380
+ #### Parameters
381
+
382
+ | Name | Type | Description |
383
+ | :------ | :------ | :------ |
384
+ | `value` | `string` \| `number` \| `boolean` \| `Date` | The value to be compared |
385
+
386
+ #### Returns
387
+
388
+ [`Search`](Search.md)
389
+
390
+ The [Search](Search.md) that was called to create this [WhereField](WhereField.md).
391
+
392
+ #### Defined in
393
+
394
+ [lib/search/where-field.ts:50](https://github.com/redis/redis-om-node/blob/d8438f7/lib/search/where-field.ts#L50)
395
+
396
+ ___
397
+
398
+ ### equals
399
+
400
+ ▸ **equals**(`value`): [`Search`](Search.md)
401
+
402
+ Adds an equals comparison to the query.
403
+
404
+ NOTE: this function is not available for strings where full-text
405
+ search is enabled. In that scenario, use `.match`.
406
+
407
+ #### Parameters
408
+
409
+ | Name | Type | Description |
410
+ | :------ | :------ | :------ |
411
+ | `value` | `string` \| `number` \| `boolean` \| `Date` | The value to be compared |
412
+
413
+ #### Returns
414
+
415
+ [`Search`](Search.md)
416
+
417
+ The [Search](Search.md) that was called to create this [WhereField](WhereField.md).
418
+
419
+ #### Defined in
420
+
421
+ [lib/search/where-field.ts:40](https://github.com/redis/redis-om-node/blob/d8438f7/lib/search/where-field.ts#L40)
422
+
423
+ ___
424
+
425
+ ### false
426
+
427
+ ▸ **false**(): [`Search`](Search.md)
428
+
429
+ Adds a boolean match with a value of `false` to the query.
430
+
431
+ #### Returns
432
+
433
+ [`Search`](Search.md)
434
+
435
+ The [Search](Search.md) that was called to create this [WhereField](WhereField.md).
436
+
437
+ #### Defined in
438
+
439
+ [lib/search/where-field.ts:115](https://github.com/redis/redis-om-node/blob/d8438f7/lib/search/where-field.ts#L115)
440
+
441
+ ___
442
+
443
+ ### greaterThan
444
+
445
+ ▸ **greaterThan**(`value`): [`Search`](Search.md)
446
+
447
+ Adds a greater than comparison against a field to the search query.
448
+
449
+ #### Parameters
450
+
451
+ | Name | Type | Description |
452
+ | :------ | :------ | :------ |
453
+ | `value` | `string` \| `number` \| `Date` | The value to compare against. |
454
+
455
+ #### Returns
456
+
457
+ [`Search`](Search.md)
458
+
459
+ The [Search](Search.md) that was called to create this [WhereField](WhereField.md).
460
+
461
+ #### Defined in
462
+
463
+ [lib/search/where-field.ts:129](https://github.com/redis/redis-om-node/blob/d8438f7/lib/search/where-field.ts#L129)
464
+
465
+ ___
466
+
467
+ ### greaterThanOrEqualTo
468
+
469
+ ▸ **greaterThanOrEqualTo**(`value`): [`Search`](Search.md)
470
+
471
+ Adds a greater than or equal to comparison against a field to the search query.
472
+
473
+ #### Parameters
474
+
475
+ | Name | Type | Description |
476
+ | :------ | :------ | :------ |
477
+ | `value` | `string` \| `number` \| `Date` | The value to compare against. |
478
+
479
+ #### Returns
480
+
481
+ [`Search`](Search.md)
482
+
483
+ The [Search](Search.md) that was called to create this [WhereField](WhereField.md).
484
+
485
+ #### Defined in
486
+
487
+ [lib/search/where-field.ts:143](https://github.com/redis/redis-om-node/blob/d8438f7/lib/search/where-field.ts#L143)
488
+
489
+ ___
490
+
491
+ ### gt
492
+
493
+ ▸ **gt**(`value`): [`Search`](Search.md)
494
+
495
+ Adds a greater than comparison against a field to the search query.
496
+
497
+ #### Parameters
498
+
499
+ | Name | Type | Description |
500
+ | :------ | :------ | :------ |
501
+ | `value` | `string` \| `number` \| `Date` | The value to compare against. |
502
+
503
+ #### Returns
504
+
505
+ [`Search`](Search.md)
506
+
507
+ The [Search](Search.md) that was called to create this [WhereField](WhereField.md).
508
+
509
+ #### Defined in
510
+
511
+ [lib/search/where-field.ts:122](https://github.com/redis/redis-om-node/blob/d8438f7/lib/search/where-field.ts#L122)
512
+
513
+ ___
514
+
515
+ ### gte
516
+
517
+ ▸ **gte**(`value`): [`Search`](Search.md)
518
+
519
+ Adds a greater than or equal to comparison against a field to the search query.
520
+
521
+ #### Parameters
522
+
523
+ | Name | Type | Description |
524
+ | :------ | :------ | :------ |
525
+ | `value` | `string` \| `number` \| `Date` | The value to compare against. |
526
+
527
+ #### Returns
528
+
529
+ [`Search`](Search.md)
530
+
531
+ The [Search](Search.md) that was called to create this [WhereField](WhereField.md).
532
+
533
+ #### Defined in
534
+
535
+ [lib/search/where-field.ts:136](https://github.com/redis/redis-om-node/blob/d8438f7/lib/search/where-field.ts#L136)
536
+
537
+ ___
538
+
539
+ ### inCircle
540
+
541
+ ▸ **inCircle**(`circleFn`): [`Search`](Search.md)
542
+
543
+ Adds a search for points that fall within a defined circle.
544
+
545
+ #### Parameters
546
+
547
+ | Name | Type | Description |
548
+ | :------ | :------ | :------ |
549
+ | `circleFn` | [`CircleFunction`](../README.md#circlefunction) | A function that returns a [Circle](Circle.md) instance defining the search area. |
550
+
551
+ #### Returns
552
+
553
+ [`Search`](Search.md)
554
+
555
+ The [Search](Search.md) that was called to create this [WhereField](WhereField.md).
556
+
557
+ #### Defined in
558
+
559
+ [lib/search/where-field.ts:216](https://github.com/redis/redis-om-node/blob/d8438f7/lib/search/where-field.ts#L216)
560
+
561
+ ___
562
+
563
+ ### inRadius
564
+
565
+ ▸ **inRadius**(`circleFn`): [`Search`](Search.md)
566
+
567
+ Adds a search for points that fall within a defined radius.
568
+
569
+ #### Parameters
570
+
571
+ | Name | Type | Description |
572
+ | :------ | :------ | :------ |
573
+ | `circleFn` | [`CircleFunction`](../README.md#circlefunction) | A function that returns a [Circle](Circle.md) instance defining the search area. |
574
+
575
+ #### Returns
576
+
577
+ [`Search`](Search.md)
578
+
579
+ The [Search](Search.md) that was called to create this [WhereField](WhereField.md).
580
+
581
+ #### Defined in
582
+
583
+ [lib/search/where-field.ts:223](https://github.com/redis/redis-om-node/blob/d8438f7/lib/search/where-field.ts#L223)
584
+
585
+ ___
586
+
587
+ ### lessThan
588
+
589
+ ▸ **lessThan**(`value`): [`Search`](Search.md)
590
+
591
+ Adds a less than comparison against a field to the search query.
592
+
593
+ #### Parameters
594
+
595
+ | Name | Type | Description |
596
+ | :------ | :------ | :------ |
597
+ | `value` | `string` \| `number` \| `Date` | The value to compare against. |
598
+
599
+ #### Returns
600
+
601
+ [`Search`](Search.md)
602
+
603
+ The [Search](Search.md) that was called to create this [WhereField](WhereField.md).
604
+
605
+ #### Defined in
606
+
607
+ [lib/search/where-field.ts:157](https://github.com/redis/redis-om-node/blob/d8438f7/lib/search/where-field.ts#L157)
608
+
609
+ ___
610
+
611
+ ### lessThanOrEqualTo
612
+
613
+ ▸ **lessThanOrEqualTo**(`value`): [`Search`](Search.md)
614
+
615
+ Adds a less than or equal to comparison against a field to the search query.
616
+
617
+ #### Parameters
618
+
619
+ | Name | Type | Description |
620
+ | :------ | :------ | :------ |
621
+ | `value` | `string` \| `number` \| `Date` | The value to compare against. |
622
+
623
+ #### Returns
624
+
625
+ [`Search`](Search.md)
626
+
627
+ The [Search](Search.md) that was called to create this [WhereField](WhereField.md).
628
+
629
+ #### Defined in
630
+
631
+ [lib/search/where-field.ts:171](https://github.com/redis/redis-om-node/blob/d8438f7/lib/search/where-field.ts#L171)
632
+
633
+ ___
634
+
635
+ ### lt
636
+
637
+ ▸ **lt**(`value`): [`Search`](Search.md)
638
+
639
+ Adds a less than comparison against a field to the search query.
640
+
641
+ #### Parameters
642
+
643
+ | Name | Type | Description |
644
+ | :------ | :------ | :------ |
645
+ | `value` | `string` \| `number` \| `Date` | The value to compare against. |
646
+
647
+ #### Returns
648
+
649
+ [`Search`](Search.md)
650
+
651
+ The [Search](Search.md) that was called to create this [WhereField](WhereField.md).
652
+
653
+ #### Defined in
654
+
655
+ [lib/search/where-field.ts:150](https://github.com/redis/redis-om-node/blob/d8438f7/lib/search/where-field.ts#L150)
656
+
657
+ ___
658
+
659
+ ### lte
660
+
661
+ ▸ **lte**(`value`): [`Search`](Search.md)
662
+
663
+ Adds a less than or equal to comparison against a field to the search query.
664
+
665
+ #### Parameters
666
+
667
+ | Name | Type | Description |
668
+ | :------ | :------ | :------ |
669
+ | `value` | `string` \| `number` \| `Date` | The value to compare against. |
670
+
671
+ #### Returns
672
+
673
+ [`Search`](Search.md)
674
+
675
+ The [Search](Search.md) that was called to create this [WhereField](WhereField.md).
676
+
677
+ #### Defined in
678
+
679
+ [lib/search/where-field.ts:164](https://github.com/redis/redis-om-node/blob/d8438f7/lib/search/where-field.ts#L164)
680
+
681
+ ___
682
+
683
+ ### match
684
+
685
+ ▸ **match**(`value`, `options?`): [`Search`](Search.md)
686
+
687
+ Adds a full-text search comparison to the query.
688
+
689
+ #### Parameters
690
+
691
+ | Name | Type | Description |
692
+ | :------ | :------ | :------ |
693
+ | `value` | `string` \| `number` \| `boolean` | The word or phrase sought. |
694
+ | `options?` | `Object` | - |
695
+ | `options.fuzzyMatching?` | `boolean` | Whether to use fuzzy matching to find the sought word or phrase. Defaults to `false`. |
696
+ | `options.levenshteinDistance?` | ``2`` \| ``1`` \| ``3`` | The levenshtein distance to use for fuzzy matching. Supported values are `1`, `2`, and `3`. Defaults to `1`. |
697
+
698
+ #### Returns
699
+
700
+ [`Search`](Search.md)
701
+
702
+ The [Search](Search.md) that was called to create this [WhereField](WhereField.md).
703
+
704
+ #### Defined in
705
+
706
+ [lib/search/where-field.ts:59](https://github.com/redis/redis-om-node/blob/d8438f7/lib/search/where-field.ts#L59)
707
+
708
+ ___
709
+
710
+ ### matchExact
711
+
712
+ ▸ **matchExact**(`value`): [`Search`](Search.md)
713
+
714
+ Adds a full-text search comparison to the query that matches an exact word or phrase.
715
+
716
+ #### Parameters
717
+
718
+ | Name | Type | Description |
719
+ | :------ | :------ | :------ |
720
+ | `value` | `string` \| `number` \| `boolean` | The word or phrase sought. |
721
+
722
+ #### Returns
723
+
724
+ [`Search`](Search.md)
725
+
726
+ The [Search](Search.md) that was called to create this [WhereField](WhereField.md).
727
+
728
+ #### Defined in
729
+
730
+ [lib/search/where-field.ts:75](https://github.com/redis/redis-om-node/blob/d8438f7/lib/search/where-field.ts#L75)
731
+
732
+ ___
733
+
734
+ ### matchExactly
735
+
736
+ ▸ **matchExactly**(`value`): [`Search`](Search.md)
737
+
738
+ Adds a full-text search comparison to the query that matches an exact word or phrase.
739
+
740
+ #### Parameters
741
+
742
+ | Name | Type | Description |
743
+ | :------ | :------ | :------ |
744
+ | `value` | `string` \| `number` \| `boolean` | The word or phrase sought. |
745
+
746
+ #### Returns
747
+
748
+ [`Search`](Search.md)
749
+
750
+ The [Search](Search.md) that was called to create this [WhereField](WhereField.md).
751
+
752
+ #### Defined in
753
+
754
+ [lib/search/where-field.ts:82](https://github.com/redis/redis-om-node/blob/d8438f7/lib/search/where-field.ts#L82)
755
+
756
+ ___
757
+
758
+ ### matches
759
+
760
+ ▸ **matches**(`value`, `options?`): [`Search`](Search.md)
761
+
762
+ Adds a full-text search comparison to the query.
763
+
764
+ #### Parameters
765
+
766
+ | Name | Type | Description |
767
+ | :------ | :------ | :------ |
768
+ | `value` | `string` \| `number` \| `boolean` | The word or phrase sought. |
769
+ | `options?` | `Object` | - |
770
+ | `options.fuzzyMatching?` | `boolean` | Whether to use fuzzy matching to find the sought word or phrase. Defaults to `false`. |
771
+ | `options.levenshteinDistance?` | ``2`` \| ``1`` \| ``3`` | The levenshtein distance to use for fuzzy matching. Supported values are `1`, `2`, and `3`. Defaults to `1`. |
772
+
773
+ #### Returns
774
+
775
+ [`Search`](Search.md)
776
+
777
+ The [Search](Search.md) that was called to create this [WhereField](WhereField.md).
778
+
779
+ #### Defined in
780
+
781
+ [lib/search/where-field.ts:68](https://github.com/redis/redis-om-node/blob/d8438f7/lib/search/where-field.ts#L68)
782
+
783
+ ___
784
+
785
+ ### matchesExactly
786
+
787
+ ▸ **matchesExactly**(`value`): [`Search`](Search.md)
788
+
789
+ Adds a full-text search comparison to the query that matches an exact word or phrase.
790
+
791
+ #### Parameters
792
+
793
+ | Name | Type | Description |
794
+ | :------ | :------ | :------ |
795
+ | `value` | `string` \| `number` \| `boolean` | The word or phrase sought. |
796
+
797
+ #### Returns
798
+
799
+ [`Search`](Search.md)
800
+
801
+ The [Search](Search.md) that was called to create this [WhereField](WhereField.md).
802
+
803
+ #### Defined in
804
+
805
+ [lib/search/where-field.ts:89](https://github.com/redis/redis-om-node/blob/d8438f7/lib/search/where-field.ts#L89)
806
+
807
+ ___
808
+
809
+ ### on
810
+
811
+ ▸ **on**(`value`): [`Search`](Search.md)
812
+
813
+ Add a search for an exact UTC datetime to the query.
814
+
815
+ #### Parameters
816
+
817
+ | Name | Type | Description |
818
+ | :------ | :------ | :------ |
819
+ | `value` | `string` \| `number` \| `Date` | The datetime to match. |
820
+
821
+ #### Returns
822
+
823
+ [`Search`](Search.md)
824
+
825
+ The [Search](Search.md) that was called to create this [WhereField](WhereField.md).
826
+
827
+ #### Defined in
828
+
829
+ [lib/search/where-field.ts:230](https://github.com/redis/redis-om-node/blob/d8438f7/lib/search/where-field.ts#L230)
830
+
831
+ ___
832
+
833
+ ### onOrAfter
834
+
835
+ ▸ **onOrAfter**(`value`): [`Search`](Search.md)
836
+
837
+ Add a search that matches all datetimes *on or after* the provided UTC datetime to the query.
838
+
839
+ #### Parameters
840
+
841
+ | Name | Type | Description |
842
+ | :------ | :------ | :------ |
843
+ | `value` | `string` \| `number` \| `Date` | The datetime to compare against. |
844
+
845
+ #### Returns
846
+
847
+ [`Search`](Search.md)
848
+
849
+ The [Search](Search.md) that was called to create this [WhereField](WhereField.md).
850
+
851
+ #### Defined in
852
+
853
+ [lib/search/where-field.ts:258](https://github.com/redis/redis-om-node/blob/d8438f7/lib/search/where-field.ts#L258)
854
+
855
+ ___
856
+
857
+ ### onOrBefore
858
+
859
+ ▸ **onOrBefore**(`value`): [`Search`](Search.md)
860
+
861
+ Add a search that matches all datetimes *on or before* the provided UTC datetime to the query.
862
+
863
+ #### Parameters
864
+
865
+ | Name | Type | Description |
866
+ | :------ | :------ | :------ |
867
+ | `value` | `string` \| `number` \| `Date` | The datetime to compare against. |
868
+
869
+ #### Returns
870
+
871
+ [`Search`](Search.md)
872
+
873
+ The [Search](Search.md) that was called to create this [WhereField](WhereField.md).
874
+
875
+ #### Defined in
876
+
877
+ [lib/search/where-field.ts:251](https://github.com/redis/redis-om-node/blob/d8438f7/lib/search/where-field.ts#L251)
878
+
879
+ ___
880
+
881
+ ### toString
882
+
883
+ ▸ `Abstract` **toString**(): `string`
884
+
885
+ Converts this [Where](Where.md) into a portion of a RediSearch query.
886
+
887
+ #### Returns
888
+
889
+ `string`
890
+
891
+ #### Inherited from
892
+
893
+ [Where](Where.md).[toString](Where.md#tostring)
894
+
895
+ #### Defined in
896
+
897
+ [lib/search/where-field.ts:307](https://github.com/redis/redis-om-node/blob/d8438f7/lib/search/where-field.ts#L307)
898
+
899
+ ___
900
+
901
+ ### true
902
+
903
+ ▸ **true**(): [`Search`](Search.md)
904
+
905
+ Adds a boolean match with a value of `true` to the query.
906
+
907
+ #### Returns
908
+
909
+ [`Search`](Search.md)
910
+
911
+ The [Search](Search.md) that was called to create this [WhereField](WhereField.md).
912
+
913
+ #### Defined in
914
+
915
+ [lib/search/where-field.ts:109](https://github.com/redis/redis-om-node/blob/d8438f7/lib/search/where-field.ts#L109)