Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOCS-16824: fix lookup output #225

Merged
merged 1 commit into from
Aug 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 29 additions & 17 deletions source/fundamentals/linq.txt
Original file line number Diff line number Diff line change
Expand Up @@ -426,8 +426,8 @@ documents from the "joined" collection.

.. note::

To perform a lookup, you must make both collections queryable using the
``AsQueryable`` method.
To perform a lookup, you must make both collections queryable by using the
``AsQueryable()`` method.

To learn how to make a collection queryable, see :ref:`csharp-linq-queryable`.

Expand All @@ -445,7 +445,7 @@ The following ``Review`` class models the documents in the ``reviews`` collectio
:end-before: end-review-model

Select the :guilabel:`Method Syntax` or :guilabel:`Query Syntax` tab to see how
to generate a ``$lookup`` stage using LINQ:
to generate a ``$lookup`` stage by using LINQ:

.. tabs::

Expand Down Expand Up @@ -477,25 +477,37 @@ reviews for that restaurant. A review matches a restaurant if the value of the
``name`` field in the review document matches the ``name`` field of the restaurant
document.

The following is a subset of the returned results:
The following shows a subset of the returned results:

.. code-block:: json

// Results Truncated

{ "restaurant" : {
"_id" : ObjectId("..."),
"name" : "The Movable Feast",
"restaurant_id" : "40361606",
"cuisine" : "American",
"address" : {...},
"borough" : "Brooklyn",
"grades" : [...] },
"reviews" : [
{ "_id" : ObjectId(...), "restaurant_name" : "The Movable Feast", "reviewer" : "Lazlo Cravensworth", "review_text" : "Great restaurant! 12/10 stars!" },
{ "_id" : ObjectId("..."), "restaurant_name" : "The Movable Feast", "reviewer" : "Michael Scarn", "review_text" : "It really was a feast" }
]
}
{
"restaurant": {
"_id": ObjectId("..."),
"name": "The Movable Feast",
"restaurant_id": "40361606",
"cuisine": "American",
"address": { ... },
"borough": "Brooklyn",
"grades": [ ... ]
},
"reviews": [
{
"_id": ObjectId("..."),
"restaurant_name": "The Movable Feast",
"reviewer": "Lazlo Cravensworth",
"review_text": "Great restaurant! 12/10 stars!"
},
{
"_id": ObjectId("..."),
"restaurant_name": "The Movable Feast",
"reviewer": "Michael Scarn",
"review_text": "It really was a feast"
}
]
}

$vectorSearch
~~~~~~~~~~~~~
Expand Down
Loading