You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/fundamentals/documentarray/matching.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,15 +17,15 @@ Though both `.find()` and `.match()` is about finding nearest neighbours of a gi
17
17
-`.find()` always requires the query on the right-hand side. Say you have a DocumentArray with one million Documents, to find one query's nearest neightbours you should write `one_million_docs.find(query)`;
18
18
-`.match()` assumes the query is on left-hand side. `A.match(B)` semantically means "A matches against B and save the results to A". So with `.match()` you should write `query.match(one_million_docs)`.
19
19
20
-
##### What is type of the query?
20
+
##### What is the type of the query?
21
21
- query (RHS) in `.find()` can be plain NdArray-like object or a single Document or a DocumentArray.
22
-
- query (lHS) in `.match()` can be either a Document or a DocumentArray.
22
+
- query (LHS) in `.match()` can be either a Document or a DocumentArray.
23
23
24
24
##### What is the return?
25
25
-`.find()` returns a List of DocumentArray, each of which corresponds to one element/row in the query.
26
26
-`.match()` do not return anything. Match results are stored inside right-hand side's `.matches`.
27
27
28
-
In the example below, we will use `.match()` to describe the feature. But keep in mind, `.find()` should always work by simply switching the right and left-hand sides.
28
+
In the sequel, we will use `.match()` to describe the features. But keep in mind that `.find()` should also work by simply switching the right and left-hand sides.
0 commit comments