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