forked from mongodb/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
apiargs-agg-indexOfArray-fields.yaml
67 lines (62 loc) · 2.04 KB
/
apiargs-agg-indexOfArray-fields.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: <array>
position: 1
type: string
description: |
Can be any valid :ref:`expression <aggregation-expressions>` as long
as it resolves to an array. For more information on expressions, see
:ref:`aggregation-expressions`.
If the array expression resolves to a value of ``null`` or refers to
a field that is missing, :expression:`$indexOfArray` returns
``null``.
If the array expression does not resolve to an array or ``null`` nor
refers to a missing field, :expression:`$indexOfArray` returns an
error.
optional: false
operation: indexOfArray
interface: pipeline
arg_name: field
---
name: <search value>
position: 2
type: string
description: |
Can be any valid :ref:`expression <aggregation-expressions>`. For
more information on expressions, see :ref:`aggregation-expressions`.
optional: false
operation: indexOfArray
interface: pipeline
arg_name: field
---
name: <start>
position: 3
type: integer
description: |
An integer, or a number that can be represented as integers (such as
2.0), that specifies the starting index position for the search. Can
be any valid :ref:`expression <aggregation-expressions>` that
resolves to a non-negative integral number.
If unspecified, the starting index position for the search is the
beginning of the string.
optional: true
operation: indexOfArray
interface: pipeline
arg_name: field
---
name: <end>
position: 4
type: integer
description: |
An integer, or a number that can be represented as integers (such as
2.0), that specifies the ending index position for the search. Can
be any valid :ref:`expression <aggregation-expressions>` that
resolves to a non-negative integral number. If you specify a
``<end>`` index value, you should also specify a ``<start>`` index
value; otherwise, :expression:`$indexOfArray` uses the ``<end>``
value as the ``<start>`` index value instead of the ``<end>`` value.
If unspecified, the ending index position for the search is the
end of the string.
optional: true
operation: indexOfArray
interface: pipeline
arg_name: field
...