redis-om-type 1.0.0

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,1063 @@
1
+ [redis-om](../README.md) / RawSearch
2
+
3
+ # Class: RawSearch
4
+
5
+ Entry point to raw search which allows using raw RediSearch queries
6
+ against Redis OM. Requires that RediSearch (and optionally RedisJSON) be
7
+ installed.
8
+
9
+ **`Template`**
10
+
11
+ The type of [Entity](../README.md#entity) being sought.
12
+
13
+ ## Hierarchy
14
+
15
+ - [`AbstractSearch`](AbstractSearch.md)
16
+
17
+ ↳ **`RawSearch`**
18
+
19
+ ## Table of contents
20
+
21
+ ### Accessors
22
+
23
+ - [return](RawSearch.md#return)
24
+
25
+ ### Methods
26
+
27
+ - [all](RawSearch.md#all)
28
+ - [allIds](RawSearch.md#allids)
29
+ - [allKeys](RawSearch.md#allkeys)
30
+ - [count](RawSearch.md#count)
31
+ - [first](RawSearch.md#first)
32
+ - [firstId](RawSearch.md#firstid)
33
+ - [firstKey](RawSearch.md#firstkey)
34
+ - [max](RawSearch.md#max)
35
+ - [maxId](RawSearch.md#maxid)
36
+ - [maxKey](RawSearch.md#maxkey)
37
+ - [min](RawSearch.md#min)
38
+ - [minId](RawSearch.md#minid)
39
+ - [minKey](RawSearch.md#minkey)
40
+ - [page](RawSearch.md#page)
41
+ - [pageOfIds](RawSearch.md#pageofids)
42
+ - [pageOfKeys](RawSearch.md#pageofkeys)
43
+ - [returnAll](RawSearch.md#returnall)
44
+ - [returnAllIds](RawSearch.md#returnallids)
45
+ - [returnAllKeys](RawSearch.md#returnallkeys)
46
+ - [returnCount](RawSearch.md#returncount)
47
+ - [returnFirst](RawSearch.md#returnfirst)
48
+ - [returnFirstId](RawSearch.md#returnfirstid)
49
+ - [returnFirstKey](RawSearch.md#returnfirstkey)
50
+ - [returnMax](RawSearch.md#returnmax)
51
+ - [returnMaxId](RawSearch.md#returnmaxid)
52
+ - [returnMaxKey](RawSearch.md#returnmaxkey)
53
+ - [returnMin](RawSearch.md#returnmin)
54
+ - [returnMinId](RawSearch.md#returnminid)
55
+ - [returnMinKey](RawSearch.md#returnminkey)
56
+ - [returnPage](RawSearch.md#returnpage)
57
+ - [returnPageOfIds](RawSearch.md#returnpageofids)
58
+ - [returnPageOfKeys](RawSearch.md#returnpageofkeys)
59
+ - [sortAsc](RawSearch.md#sortasc)
60
+ - [sortAscending](RawSearch.md#sortascending)
61
+ - [sortBy](RawSearch.md#sortby)
62
+ - [sortDesc](RawSearch.md#sortdesc)
63
+ - [sortDescending](RawSearch.md#sortdescending)
64
+
65
+ ## Accessors
66
+
67
+ ### return
68
+
69
+ • `get` **return**(): [`AbstractSearch`](AbstractSearch.md)
70
+
71
+ Returns the current instance. Syntactic sugar to make your code more fluent.
72
+
73
+ #### Returns
74
+
75
+ [`AbstractSearch`](AbstractSearch.md)
76
+
77
+ this
78
+
79
+ #### Inherited from
80
+
81
+ AbstractSearch.return
82
+
83
+ #### Defined in
84
+
85
+ [lib/search/search.ts:308](https://github.com/redis/redis-om-node/blob/d8438f7/lib/search/search.ts#L308)
86
+
87
+ ## Methods
88
+
89
+ ### all
90
+
91
+ ▸ **all**(`options?`): `Promise`<[`Entity`](../README.md#entity)[]\>
92
+
93
+ Returns all the [Entities](../README.md#entity) that match this query. This method
94
+ makes multiple calls to Redis until all the [Entities](../README.md#entity) are returned.
95
+ You can specify the batch size by setting the `pageSize` property on the
96
+ options:
97
+
98
+ ```typescript
99
+ const entities = await repository.search().returnAll({ pageSize: 100 })
100
+ ```
101
+
102
+ #### Parameters
103
+
104
+ | Name | Type | Default value | Description |
105
+ | :------ | :------ | :------ | :------ |
106
+ | `options` | `Object` | `undefined` | Options for the call. |
107
+ | `options.pageSize` | `number` | `10` | Number of [Entities](../README.md#entity) returned per batch. |
108
+
109
+ #### Returns
110
+
111
+ `Promise`<[`Entity`](../README.md#entity)[]\>
112
+
113
+ An array of [Entities](../README.md#entity) matching the query.
114
+
115
+ #### Inherited from
116
+
117
+ [AbstractSearch](AbstractSearch.md).[all](AbstractSearch.md#all)
118
+
119
+ #### Defined in
120
+
121
+ [lib/search/search.ts:264](https://github.com/redis/redis-om-node/blob/d8438f7/lib/search/search.ts#L264)
122
+
123
+ ___
124
+
125
+ ### allIds
126
+
127
+ ▸ **allIds**(`options?`): `Promise`<`string`[]\>
128
+
129
+ Returns all the entity IDs that match this query. This method
130
+ makes multiple calls to Redis until all the entity IDs are returned.
131
+ You can specify the batch size by setting the `pageSize` property on the
132
+ options:
133
+
134
+ ```typescript
135
+ const keys = await repository.search().returnAllIds({ pageSize: 100 })
136
+ ```
137
+
138
+ #### Parameters
139
+
140
+ | Name | Type | Default value | Description |
141
+ | :------ | :------ | :------ | :------ |
142
+ | `options` | `Object` | `undefined` | Options for the call. |
143
+ | `options.pageSize` | `number` | `10` | Number of entity IDs returned per batch. |
144
+
145
+ #### Returns
146
+
147
+ `Promise`<`string`[]\>
148
+
149
+ An array of entity IDs matching the query.
150
+
151
+ #### Inherited from
152
+
153
+ [AbstractSearch](AbstractSearch.md).[allIds](AbstractSearch.md#allids)
154
+
155
+ #### Defined in
156
+
157
+ [lib/search/search.ts:282](https://github.com/redis/redis-om-node/blob/d8438f7/lib/search/search.ts#L282)
158
+
159
+ ___
160
+
161
+ ### allKeys
162
+
163
+ ▸ **allKeys**(`options?`): `Promise`<`string`[]\>
164
+
165
+ Returns all the key names in Redis that match this query. This method
166
+ makes multiple calls to Redis until all the key names are returned.
167
+ You can specify the batch size by setting the `pageSize` property on the
168
+ options:
169
+
170
+ ```typescript
171
+ const keys = await repository.search().returnAllKeys({ pageSize: 100 })
172
+ ```
173
+
174
+ #### Parameters
175
+
176
+ | Name | Type | Default value | Description |
177
+ | :------ | :------ | :------ | :------ |
178
+ | `options` | `Object` | `undefined` | Options for the call. |
179
+ | `options.pageSize` | `number` | `10` | Number of key names returned per batch. |
180
+
181
+ #### Returns
182
+
183
+ `Promise`<`string`[]\>
184
+
185
+ An array of key names matching the query.
186
+
187
+ #### Inherited from
188
+
189
+ [AbstractSearch](AbstractSearch.md).[allKeys](AbstractSearch.md#allkeys)
190
+
191
+ #### Defined in
192
+
193
+ [lib/search/search.ts:300](https://github.com/redis/redis-om-node/blob/d8438f7/lib/search/search.ts#L300)
194
+
195
+ ___
196
+
197
+ ### count
198
+
199
+ ▸ **count**(): `Promise`<`number`\>
200
+
201
+ Returns the number of [Entities](../README.md#entity) that match this query.
202
+
203
+ #### Returns
204
+
205
+ `Promise`<`number`\>
206
+
207
+ #### Inherited from
208
+
209
+ [AbstractSearch](AbstractSearch.md).[count](AbstractSearch.md#count)
210
+
211
+ #### Defined in
212
+
213
+ [lib/search/search.ts:188](https://github.com/redis/redis-om-node/blob/d8438f7/lib/search/search.ts#L188)
214
+
215
+ ___
216
+
217
+ ### first
218
+
219
+ ▸ **first**(): `Promise`<``null`` \| [`Entity`](../README.md#entity)\>
220
+
221
+ Returns the first [Entity](../README.md#entity) that matches this query.
222
+
223
+ #### Returns
224
+
225
+ `Promise`<``null`` \| [`Entity`](../README.md#entity)\>
226
+
227
+ #### Inherited from
228
+
229
+ [AbstractSearch](AbstractSearch.md).[first](AbstractSearch.md#first)
230
+
231
+ #### Defined in
232
+
233
+ [lib/search/search.ts:229](https://github.com/redis/redis-om-node/blob/d8438f7/lib/search/search.ts#L229)
234
+
235
+ ___
236
+
237
+ ### firstId
238
+
239
+ ▸ **firstId**(): `Promise`<``null`` \| `string`\>
240
+
241
+ Returns the first entity ID that matches this query.
242
+
243
+ #### Returns
244
+
245
+ `Promise`<``null`` \| `string`\>
246
+
247
+ #### Inherited from
248
+
249
+ [AbstractSearch](AbstractSearch.md).[firstId](AbstractSearch.md#firstid)
250
+
251
+ #### Defined in
252
+
253
+ [lib/search/search.ts:237](https://github.com/redis/redis-om-node/blob/d8438f7/lib/search/search.ts#L237)
254
+
255
+ ___
256
+
257
+ ### firstKey
258
+
259
+ ▸ **firstKey**(): `Promise`<``null`` \| `string`\>
260
+
261
+ Returns the first key name that matches this query.
262
+
263
+ #### Returns
264
+
265
+ `Promise`<``null`` \| `string`\>
266
+
267
+ #### Inherited from
268
+
269
+ [AbstractSearch](AbstractSearch.md).[firstKey](AbstractSearch.md#firstkey)
270
+
271
+ #### Defined in
272
+
273
+ [lib/search/search.ts:245](https://github.com/redis/redis-om-node/blob/d8438f7/lib/search/search.ts#L245)
274
+
275
+ ___
276
+
277
+ ### max
278
+
279
+ ▸ **max**(`field`): `Promise`<``null`` \| [`Entity`](../README.md#entity)\>
280
+
281
+ Finds the [Entity](../README.md#entity) with the maximal value for a field.
282
+
283
+ #### Parameters
284
+
285
+ | Name | Type | Description |
286
+ | :------ | :------ | :------ |
287
+ | `field` | `string` | The field with the maximal value. |
288
+
289
+ #### Returns
290
+
291
+ `Promise`<``null`` \| [`Entity`](../README.md#entity)\>
292
+
293
+ The entity ID [Entity](../README.md#entity) with the maximal value
294
+
295
+ #### Inherited from
296
+
297
+ [AbstractSearch](AbstractSearch.md).[max](AbstractSearch.md#max)
298
+
299
+ #### Defined in
300
+
301
+ [lib/search/search.ts:162](https://github.com/redis/redis-om-node/blob/d8438f7/lib/search/search.ts#L162)
302
+
303
+ ___
304
+
305
+ ### maxId
306
+
307
+ ▸ **maxId**(`field`): `Promise`<``null`` \| `string`\>
308
+
309
+ Finds the entity ID with the maximal value for a field.
310
+
311
+ #### Parameters
312
+
313
+ | Name | Type | Description |
314
+ | :------ | :------ | :------ |
315
+ | `field` | `string` | The field with the maximal value. |
316
+
317
+ #### Returns
318
+
319
+ `Promise`<``null`` \| `string`\>
320
+
321
+ The entity ID with the maximal value
322
+
323
+ #### Inherited from
324
+
325
+ [AbstractSearch](AbstractSearch.md).[maxId](AbstractSearch.md#maxid)
326
+
327
+ #### Defined in
328
+
329
+ [lib/search/search.ts:171](https://github.com/redis/redis-om-node/blob/d8438f7/lib/search/search.ts#L171)
330
+
331
+ ___
332
+
333
+ ### maxKey
334
+
335
+ ▸ **maxKey**(`field`): `Promise`<``null`` \| `string`\>
336
+
337
+ Finds the key name in Redis with the maximal value for a field.
338
+
339
+ #### Parameters
340
+
341
+ | Name | Type | Description |
342
+ | :------ | :------ | :------ |
343
+ | `field` | `string` | The field with the maximal value. |
344
+
345
+ #### Returns
346
+
347
+ `Promise`<``null`` \| `string`\>
348
+
349
+ The key name with the maximal value
350
+
351
+ #### Inherited from
352
+
353
+ [AbstractSearch](AbstractSearch.md).[maxKey](AbstractSearch.md#maxkey)
354
+
355
+ #### Defined in
356
+
357
+ [lib/search/search.ts:180](https://github.com/redis/redis-om-node/blob/d8438f7/lib/search/search.ts#L180)
358
+
359
+ ___
360
+
361
+ ### min
362
+
363
+ ▸ **min**(`field`): `Promise`<``null`` \| [`Entity`](../README.md#entity)\>
364
+
365
+ Finds the [Entity](../README.md#entity) with the minimal value for a field.
366
+
367
+ #### Parameters
368
+
369
+ | Name | Type | Description |
370
+ | :------ | :------ | :------ |
371
+ | `field` | `string` | The field with the minimal value. |
372
+
373
+ #### Returns
374
+
375
+ `Promise`<``null`` \| [`Entity`](../README.md#entity)\>
376
+
377
+ The [Entity](../README.md#entity) with the minimal value
378
+
379
+ #### Inherited from
380
+
381
+ [AbstractSearch](AbstractSearch.md).[min](AbstractSearch.md#min)
382
+
383
+ #### Defined in
384
+
385
+ [lib/search/search.ts:135](https://github.com/redis/redis-om-node/blob/d8438f7/lib/search/search.ts#L135)
386
+
387
+ ___
388
+
389
+ ### minId
390
+
391
+ ▸ **minId**(`field`): `Promise`<``null`` \| `string`\>
392
+
393
+ Finds the entity ID with the minimal value for a field.
394
+
395
+ #### Parameters
396
+
397
+ | Name | Type | Description |
398
+ | :------ | :------ | :------ |
399
+ | `field` | `string` | The field with the minimal value. |
400
+
401
+ #### Returns
402
+
403
+ `Promise`<``null`` \| `string`\>
404
+
405
+ The entity ID with the minimal value
406
+
407
+ #### Inherited from
408
+
409
+ [AbstractSearch](AbstractSearch.md).[minId](AbstractSearch.md#minid)
410
+
411
+ #### Defined in
412
+
413
+ [lib/search/search.ts:144](https://github.com/redis/redis-om-node/blob/d8438f7/lib/search/search.ts#L144)
414
+
415
+ ___
416
+
417
+ ### minKey
418
+
419
+ ▸ **minKey**(`field`): `Promise`<``null`` \| `string`\>
420
+
421
+ Finds the key name in Redis with the minimal value for a field.
422
+
423
+ #### Parameters
424
+
425
+ | Name | Type | Description |
426
+ | :------ | :------ | :------ |
427
+ | `field` | `string` | The field with the minimal value. |
428
+
429
+ #### Returns
430
+
431
+ `Promise`<``null`` \| `string`\>
432
+
433
+ The key name with the minimal value
434
+
435
+ #### Inherited from
436
+
437
+ [AbstractSearch](AbstractSearch.md).[minKey](AbstractSearch.md#minkey)
438
+
439
+ #### Defined in
440
+
441
+ [lib/search/search.ts:153](https://github.com/redis/redis-om-node/blob/d8438f7/lib/search/search.ts#L153)
442
+
443
+ ___
444
+
445
+ ### page
446
+
447
+ ▸ **page**(`offset`, `count`): `Promise`<[`Entity`](../README.md#entity)[]\>
448
+
449
+ Returns a page of [Entities](../README.md#entity) that match this query.
450
+
451
+ #### Parameters
452
+
453
+ | Name | Type | Description |
454
+ | :------ | :------ | :------ |
455
+ | `offset` | `number` | The offset for where to start returning [Entities](../README.md#entity). |
456
+ | `count` | `number` | The number of [Entities](../README.md#entity) to return. |
457
+
458
+ #### Returns
459
+
460
+ `Promise`<[`Entity`](../README.md#entity)[]\>
461
+
462
+ An array of [Entities](../README.md#entity) matching the query.
463
+
464
+ #### Inherited from
465
+
466
+ [AbstractSearch](AbstractSearch.md).[page](AbstractSearch.md#page)
467
+
468
+ #### Defined in
469
+
470
+ [lib/search/search.ts:199](https://github.com/redis/redis-om-node/blob/d8438f7/lib/search/search.ts#L199)
471
+
472
+ ___
473
+
474
+ ### pageOfIds
475
+
476
+ ▸ **pageOfIds**(`offset`, `count`): `Promise`<`string`[]\>
477
+
478
+ Returns a page of entity IDs that match this query.
479
+
480
+ #### Parameters
481
+
482
+ | Name | Type | Description |
483
+ | :------ | :------ | :------ |
484
+ | `offset` | `number` | The offset for where to start returning entity IDs. |
485
+ | `count` | `number` | The number of entity IDs to return. |
486
+
487
+ #### Returns
488
+
489
+ `Promise`<`string`[]\>
490
+
491
+ An array of strings matching the query.
492
+
493
+ #### Inherited from
494
+
495
+ [AbstractSearch](AbstractSearch.md).[pageOfIds](AbstractSearch.md#pageofids)
496
+
497
+ #### Defined in
498
+
499
+ [lib/search/search.ts:210](https://github.com/redis/redis-om-node/blob/d8438f7/lib/search/search.ts#L210)
500
+
501
+ ___
502
+
503
+ ### pageOfKeys
504
+
505
+ ▸ **pageOfKeys**(`offset`, `count`): `Promise`<`string`[]\>
506
+
507
+ Returns a page of key names in Redis that match this query.
508
+
509
+ #### Parameters
510
+
511
+ | Name | Type | Description |
512
+ | :------ | :------ | :------ |
513
+ | `offset` | `number` | The offset for where to start returning key names. |
514
+ | `count` | `number` | The number of key names to return. |
515
+
516
+ #### Returns
517
+
518
+ `Promise`<`string`[]\>
519
+
520
+ An array of strings matching the query.
521
+
522
+ #### Inherited from
523
+
524
+ [AbstractSearch](AbstractSearch.md).[pageOfKeys](AbstractSearch.md#pageofkeys)
525
+
526
+ #### Defined in
527
+
528
+ [lib/search/search.ts:221](https://github.com/redis/redis-om-node/blob/d8438f7/lib/search/search.ts#L221)
529
+
530
+ ___
531
+
532
+ ### returnAll
533
+
534
+ ▸ **returnAll**(`options?`): `Promise`<[`Entity`](../README.md#entity)[]\>
535
+
536
+ Alias for [all](Search.md#all).
537
+
538
+ #### Parameters
539
+
540
+ | Name | Type | Default value |
541
+ | :------ | :------ | :------ |
542
+ | `options` | `Object` | `undefined` |
543
+ | `options.pageSize` | `number` | `10` |
544
+
545
+ #### Returns
546
+
547
+ `Promise`<[`Entity`](../README.md#entity)[]\>
548
+
549
+ #### Inherited from
550
+
551
+ [AbstractSearch](AbstractSearch.md).[returnAll](AbstractSearch.md#returnall)
552
+
553
+ #### Defined in
554
+
555
+ [lib/search/search.ts:406](https://github.com/redis/redis-om-node/blob/d8438f7/lib/search/search.ts#L406)
556
+
557
+ ___
558
+
559
+ ### returnAllIds
560
+
561
+ ▸ **returnAllIds**(`options?`): `Promise`<`string`[]\>
562
+
563
+ Alias for [allIds](Search.md#allids).
564
+
565
+ #### Parameters
566
+
567
+ | Name | Type | Default value |
568
+ | :------ | :------ | :------ |
569
+ | `options` | `Object` | `undefined` |
570
+ | `options.pageSize` | `number` | `10` |
571
+
572
+ #### Returns
573
+
574
+ `Promise`<`string`[]\>
575
+
576
+ #### Inherited from
577
+
578
+ [AbstractSearch](AbstractSearch.md).[returnAllIds](AbstractSearch.md#returnallids)
579
+
580
+ #### Defined in
581
+
582
+ [lib/search/search.ts:413](https://github.com/redis/redis-om-node/blob/d8438f7/lib/search/search.ts#L413)
583
+
584
+ ___
585
+
586
+ ### returnAllKeys
587
+
588
+ ▸ **returnAllKeys**(`options?`): `Promise`<`string`[]\>
589
+
590
+ Alias for [allKeys](Search.md#allkeys).
591
+
592
+ #### Parameters
593
+
594
+ | Name | Type | Default value |
595
+ | :------ | :------ | :------ |
596
+ | `options` | `Object` | `undefined` |
597
+ | `options.pageSize` | `number` | `10` |
598
+
599
+ #### Returns
600
+
601
+ `Promise`<`string`[]\>
602
+
603
+ #### Inherited from
604
+
605
+ [AbstractSearch](AbstractSearch.md).[returnAllKeys](AbstractSearch.md#returnallkeys)
606
+
607
+ #### Defined in
608
+
609
+ [lib/search/search.ts:420](https://github.com/redis/redis-om-node/blob/d8438f7/lib/search/search.ts#L420)
610
+
611
+ ___
612
+
613
+ ### returnCount
614
+
615
+ ▸ **returnCount**(): `Promise`<`number`\>
616
+
617
+ Alias for [count](Search.md#count).
618
+
619
+ #### Returns
620
+
621
+ `Promise`<`number`\>
622
+
623
+ #### Inherited from
624
+
625
+ [AbstractSearch](AbstractSearch.md).[returnCount](AbstractSearch.md#returncount)
626
+
627
+ #### Defined in
628
+
629
+ [lib/search/search.ts:357](https://github.com/redis/redis-om-node/blob/d8438f7/lib/search/search.ts#L357)
630
+
631
+ ___
632
+
633
+ ### returnFirst
634
+
635
+ ▸ **returnFirst**(): `Promise`<``null`` \| [`Entity`](../README.md#entity)\>
636
+
637
+ Alias for [first](Search.md#first).
638
+
639
+ #### Returns
640
+
641
+ `Promise`<``null`` \| [`Entity`](../README.md#entity)\>
642
+
643
+ #### Inherited from
644
+
645
+ [AbstractSearch](AbstractSearch.md).[returnFirst](AbstractSearch.md#returnfirst)
646
+
647
+ #### Defined in
648
+
649
+ [lib/search/search.ts:385](https://github.com/redis/redis-om-node/blob/d8438f7/lib/search/search.ts#L385)
650
+
651
+ ___
652
+
653
+ ### returnFirstId
654
+
655
+ ▸ **returnFirstId**(): `Promise`<``null`` \| `string`\>
656
+
657
+ Alias for [firstId](Search.md#firstid).
658
+
659
+ #### Returns
660
+
661
+ `Promise`<``null`` \| `string`\>
662
+
663
+ #### Inherited from
664
+
665
+ [AbstractSearch](AbstractSearch.md).[returnFirstId](AbstractSearch.md#returnfirstid)
666
+
667
+ #### Defined in
668
+
669
+ [lib/search/search.ts:392](https://github.com/redis/redis-om-node/blob/d8438f7/lib/search/search.ts#L392)
670
+
671
+ ___
672
+
673
+ ### returnFirstKey
674
+
675
+ ▸ **returnFirstKey**(): `Promise`<``null`` \| `string`\>
676
+
677
+ Alias for [firstKey](Search.md#firstkey).
678
+
679
+ #### Returns
680
+
681
+ `Promise`<``null`` \| `string`\>
682
+
683
+ #### Inherited from
684
+
685
+ [AbstractSearch](AbstractSearch.md).[returnFirstKey](AbstractSearch.md#returnfirstkey)
686
+
687
+ #### Defined in
688
+
689
+ [lib/search/search.ts:399](https://github.com/redis/redis-om-node/blob/d8438f7/lib/search/search.ts#L399)
690
+
691
+ ___
692
+
693
+ ### returnMax
694
+
695
+ ▸ **returnMax**(`field`): `Promise`<``null`` \| [`Entity`](../README.md#entity)\>
696
+
697
+ Alias for [max](Search.md#max).
698
+
699
+ #### Parameters
700
+
701
+ | Name | Type |
702
+ | :------ | :------ |
703
+ | `field` | `string` |
704
+
705
+ #### Returns
706
+
707
+ `Promise`<``null`` \| [`Entity`](../README.md#entity)\>
708
+
709
+ #### Inherited from
710
+
711
+ [AbstractSearch](AbstractSearch.md).[returnMax](AbstractSearch.md#returnmax)
712
+
713
+ #### Defined in
714
+
715
+ [lib/search/search.ts:336](https://github.com/redis/redis-om-node/blob/d8438f7/lib/search/search.ts#L336)
716
+
717
+ ___
718
+
719
+ ### returnMaxId
720
+
721
+ ▸ **returnMaxId**(`field`): `Promise`<``null`` \| `string`\>
722
+
723
+ Alias for [maxId](Search.md#maxid).
724
+
725
+ #### Parameters
726
+
727
+ | Name | Type |
728
+ | :------ | :------ |
729
+ | `field` | `string` |
730
+
731
+ #### Returns
732
+
733
+ `Promise`<``null`` \| `string`\>
734
+
735
+ #### Inherited from
736
+
737
+ [AbstractSearch](AbstractSearch.md).[returnMaxId](AbstractSearch.md#returnmaxid)
738
+
739
+ #### Defined in
740
+
741
+ [lib/search/search.ts:343](https://github.com/redis/redis-om-node/blob/d8438f7/lib/search/search.ts#L343)
742
+
743
+ ___
744
+
745
+ ### returnMaxKey
746
+
747
+ ▸ **returnMaxKey**(`field`): `Promise`<``null`` \| `string`\>
748
+
749
+ Alias for [maxKey](Search.md#maxkey).
750
+
751
+ #### Parameters
752
+
753
+ | Name | Type |
754
+ | :------ | :------ |
755
+ | `field` | `string` |
756
+
757
+ #### Returns
758
+
759
+ `Promise`<``null`` \| `string`\>
760
+
761
+ #### Inherited from
762
+
763
+ [AbstractSearch](AbstractSearch.md).[returnMaxKey](AbstractSearch.md#returnmaxkey)
764
+
765
+ #### Defined in
766
+
767
+ [lib/search/search.ts:350](https://github.com/redis/redis-om-node/blob/d8438f7/lib/search/search.ts#L350)
768
+
769
+ ___
770
+
771
+ ### returnMin
772
+
773
+ ▸ **returnMin**(`field`): `Promise`<``null`` \| [`Entity`](../README.md#entity)\>
774
+
775
+ Alias for [min](Search.md#min).
776
+
777
+ #### Parameters
778
+
779
+ | Name | Type |
780
+ | :------ | :------ |
781
+ | `field` | `string` |
782
+
783
+ #### Returns
784
+
785
+ `Promise`<``null`` \| [`Entity`](../README.md#entity)\>
786
+
787
+ #### Inherited from
788
+
789
+ [AbstractSearch](AbstractSearch.md).[returnMin](AbstractSearch.md#returnmin)
790
+
791
+ #### Defined in
792
+
793
+ [lib/search/search.ts:315](https://github.com/redis/redis-om-node/blob/d8438f7/lib/search/search.ts#L315)
794
+
795
+ ___
796
+
797
+ ### returnMinId
798
+
799
+ ▸ **returnMinId**(`field`): `Promise`<``null`` \| `string`\>
800
+
801
+ Alias for [minId](Search.md#minid).
802
+
803
+ #### Parameters
804
+
805
+ | Name | Type |
806
+ | :------ | :------ |
807
+ | `field` | `string` |
808
+
809
+ #### Returns
810
+
811
+ `Promise`<``null`` \| `string`\>
812
+
813
+ #### Inherited from
814
+
815
+ [AbstractSearch](AbstractSearch.md).[returnMinId](AbstractSearch.md#returnminid)
816
+
817
+ #### Defined in
818
+
819
+ [lib/search/search.ts:322](https://github.com/redis/redis-om-node/blob/d8438f7/lib/search/search.ts#L322)
820
+
821
+ ___
822
+
823
+ ### returnMinKey
824
+
825
+ ▸ **returnMinKey**(`field`): `Promise`<``null`` \| `string`\>
826
+
827
+ Alias for [minKey](Search.md#minkey).
828
+
829
+ #### Parameters
830
+
831
+ | Name | Type |
832
+ | :------ | :------ |
833
+ | `field` | `string` |
834
+
835
+ #### Returns
836
+
837
+ `Promise`<``null`` \| `string`\>
838
+
839
+ #### Inherited from
840
+
841
+ [AbstractSearch](AbstractSearch.md).[returnMinKey](AbstractSearch.md#returnminkey)
842
+
843
+ #### Defined in
844
+
845
+ [lib/search/search.ts:329](https://github.com/redis/redis-om-node/blob/d8438f7/lib/search/search.ts#L329)
846
+
847
+ ___
848
+
849
+ ### returnPage
850
+
851
+ ▸ **returnPage**(`offset`, `count`): `Promise`<[`Entity`](../README.md#entity)[]\>
852
+
853
+ Alias for [page](Search.md#page).
854
+
855
+ #### Parameters
856
+
857
+ | Name | Type |
858
+ | :------ | :------ |
859
+ | `offset` | `number` |
860
+ | `count` | `number` |
861
+
862
+ #### Returns
863
+
864
+ `Promise`<[`Entity`](../README.md#entity)[]\>
865
+
866
+ #### Inherited from
867
+
868
+ [AbstractSearch](AbstractSearch.md).[returnPage](AbstractSearch.md#returnpage)
869
+
870
+ #### Defined in
871
+
872
+ [lib/search/search.ts:364](https://github.com/redis/redis-om-node/blob/d8438f7/lib/search/search.ts#L364)
873
+
874
+ ___
875
+
876
+ ### returnPageOfIds
877
+
878
+ ▸ **returnPageOfIds**(`offset`, `count`): `Promise`<`string`[]\>
879
+
880
+ Alias for [pageOfIds](Search.md#pageofids).
881
+
882
+ #### Parameters
883
+
884
+ | Name | Type |
885
+ | :------ | :------ |
886
+ | `offset` | `number` |
887
+ | `count` | `number` |
888
+
889
+ #### Returns
890
+
891
+ `Promise`<`string`[]\>
892
+
893
+ #### Inherited from
894
+
895
+ [AbstractSearch](AbstractSearch.md).[returnPageOfIds](AbstractSearch.md#returnpageofids)
896
+
897
+ #### Defined in
898
+
899
+ [lib/search/search.ts:371](https://github.com/redis/redis-om-node/blob/d8438f7/lib/search/search.ts#L371)
900
+
901
+ ___
902
+
903
+ ### returnPageOfKeys
904
+
905
+ ▸ **returnPageOfKeys**(`offset`, `count`): `Promise`<`string`[]\>
906
+
907
+ Alias for [pageOfKeys](Search.md#pageofkeys).
908
+
909
+ #### Parameters
910
+
911
+ | Name | Type |
912
+ | :------ | :------ |
913
+ | `offset` | `number` |
914
+ | `count` | `number` |
915
+
916
+ #### Returns
917
+
918
+ `Promise`<`string`[]\>
919
+
920
+ #### Inherited from
921
+
922
+ [AbstractSearch](AbstractSearch.md).[returnPageOfKeys](AbstractSearch.md#returnpageofkeys)
923
+
924
+ #### Defined in
925
+
926
+ [lib/search/search.ts:378](https://github.com/redis/redis-om-node/blob/d8438f7/lib/search/search.ts#L378)
927
+
928
+ ___
929
+
930
+ ### sortAsc
931
+
932
+ ▸ **sortAsc**(`field`): [`AbstractSearch`](AbstractSearch.md)
933
+
934
+ Alias for [sortAscending](Search.md#sortascending).
935
+
936
+ #### Parameters
937
+
938
+ | Name | Type |
939
+ | :------ | :------ |
940
+ | `field` | `string` |
941
+
942
+ #### Returns
943
+
944
+ [`AbstractSearch`](AbstractSearch.md)
945
+
946
+ #### Inherited from
947
+
948
+ [AbstractSearch](AbstractSearch.md).[sortAsc](AbstractSearch.md#sortasc)
949
+
950
+ #### Defined in
951
+
952
+ [lib/search/search.ts:86](https://github.com/redis/redis-om-node/blob/d8438f7/lib/search/search.ts#L86)
953
+
954
+ ___
955
+
956
+ ### sortAscending
957
+
958
+ ▸ **sortAscending**(`field`): [`AbstractSearch`](AbstractSearch.md)
959
+
960
+ Applies an ascending sort to the query.
961
+
962
+ #### Parameters
963
+
964
+ | Name | Type | Description |
965
+ | :------ | :------ | :------ |
966
+ | `field` | `string` | The field to sort by. |
967
+
968
+ #### Returns
969
+
970
+ [`AbstractSearch`](AbstractSearch.md)
971
+
972
+ this
973
+
974
+ #### Inherited from
975
+
976
+ [AbstractSearch](AbstractSearch.md).[sortAscending](AbstractSearch.md#sortascending)
977
+
978
+ #### Defined in
979
+
980
+ [lib/search/search.ts:63](https://github.com/redis/redis-om-node/blob/d8438f7/lib/search/search.ts#L63)
981
+
982
+ ___
983
+
984
+ ### sortBy
985
+
986
+ ▸ **sortBy**(`fieldName`, `order?`): [`AbstractSearch`](AbstractSearch.md)
987
+
988
+ Applies sorting for the query.
989
+
990
+ #### Parameters
991
+
992
+ | Name | Type | Default value | Description |
993
+ | :------ | :------ | :------ | :------ |
994
+ | `fieldName` | `string` | `undefined` | - |
995
+ | `order` | ``"ASC"`` \| ``"DESC"`` | `'ASC'` | The order of returned [Entities](../README.md#entity) Defaults to `ASC` (ascending) if not specified |
996
+
997
+ #### Returns
998
+
999
+ [`AbstractSearch`](AbstractSearch.md)
1000
+
1001
+ this
1002
+
1003
+ #### Inherited from
1004
+
1005
+ [AbstractSearch](AbstractSearch.md).[sortBy](AbstractSearch.md#sortby)
1006
+
1007
+ #### Defined in
1008
+
1009
+ [lib/search/search.ts:96](https://github.com/redis/redis-om-node/blob/d8438f7/lib/search/search.ts#L96)
1010
+
1011
+ ___
1012
+
1013
+ ### sortDesc
1014
+
1015
+ ▸ **sortDesc**(`field`): [`AbstractSearch`](AbstractSearch.md)
1016
+
1017
+ Alias for [sortDescending](Search.md#sortdescending).
1018
+
1019
+ #### Parameters
1020
+
1021
+ | Name | Type |
1022
+ | :------ | :------ |
1023
+ | `field` | `string` |
1024
+
1025
+ #### Returns
1026
+
1027
+ [`AbstractSearch`](AbstractSearch.md)
1028
+
1029
+ #### Inherited from
1030
+
1031
+ [AbstractSearch](AbstractSearch.md).[sortDesc](AbstractSearch.md#sortdesc)
1032
+
1033
+ #### Defined in
1034
+
1035
+ [lib/search/search.ts:70](https://github.com/redis/redis-om-node/blob/d8438f7/lib/search/search.ts#L70)
1036
+
1037
+ ___
1038
+
1039
+ ### sortDescending
1040
+
1041
+ ▸ **sortDescending**(`field`): [`AbstractSearch`](AbstractSearch.md)
1042
+
1043
+ Applies a descending sort to the query.
1044
+
1045
+ #### Parameters
1046
+
1047
+ | Name | Type | Description |
1048
+ | :------ | :------ | :------ |
1049
+ | `field` | `string` | The field to sort by. |
1050
+
1051
+ #### Returns
1052
+
1053
+ [`AbstractSearch`](AbstractSearch.md)
1054
+
1055
+ this
1056
+
1057
+ #### Inherited from
1058
+
1059
+ [AbstractSearch](AbstractSearch.md).[sortDescending](AbstractSearch.md#sortdescending)
1060
+
1061
+ #### Defined in
1062
+
1063
+ [lib/search/search.ts:79](https://github.com/redis/redis-om-node/blob/d8438f7/lib/search/search.ts#L79)