Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

DOCSP-46479: document Scout integration #3261

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

Merged
rustagir merged 14 commits into mongodb:5.2 from rustagir:DOCSP-46479-scout-docs
Mar 5, 2025

Conversation

@rustagir
Copy link
Contributor

@rustagir rustagir commented Feb 3, 2025
edited
Loading

https://jira.mongodb.org/browse/DOCSP-46479

Document the Scout integration.

STAGING

Checklist

  • Add tests and ensure they pass

Copy link
Contributor

@norareidy norareidy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work on this, I left some suggestions!

Copy link
Contributor

@norareidy norareidy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with some small comments!

Copy link
Member

@GromNaN GromNaN left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about putting a note at the beginning to say that if the data is in MongoDB, it's possible to create a search index without using scout with a link to the search indexes.

Scout from MongoDB to MongoDB is only useful if you want to denormalize additional data (such as adding data from a relationship to the main document).

rustagir reacted with thumbs up emoji
docs/scout.txt Outdated
Comment on lines 32 to 35
- Provides an abstraction to create search indexes on documents in
MongoDB collections and external search engines. In MongoDB, this feature
allows you to create :atlas:`Atlas Search indexes
</atlas-search/manage-indexes/>`.
Copy link
Member

@GromNaN GromNaN Feb 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For this part I would not mention other search engines. It's more: create MongoDB Atlas Indexes from any model (SQL or MongoDB).

rustagir reacted with thumbs up emoji
Copy link
Contributor Author

@rustagir rustagir Feb 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can update this list item; can you clarify how one would use Laravel MongoDB to work with SQL models? Is this possible, or is that a general statement about Laravel as a framework in general?

docs/scout.txt Outdated
Comment on lines 42 to 46
.. note:: Deployment Compatibility

You can use Laravel Scout only when you connect to MongoDB Atlas
clusters. This feature is not available for self-managed or
serverless deployments.
Copy link
Member

@GromNaN GromNaN Feb 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Search indexes are available using atlas local, or the the mongodb/mongodb-atlas-local docker image (link). I use this docker image for testing.

rustagir reacted with thumbs up emoji
Copy link
Contributor Author

@rustagir rustagir Feb 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

based on the language used on the website, Self-managed refers to Enterprise and Advanced and community edition MongoDB. So, I can adjust the first sentence to say deployments instead of clusters.

Copy link
Contributor Author

rustagir commented Feb 6, 2025

@GromNaN Qs:

  • Is the information about denormalizing the data helpful for users to know or is it in the technical weeds?
  • Should the forthcoming tutorial (the TODO in this PR) that shows users how to use Scout to import into Meilisearch be centered in this page instead of the MongoDB to MongoDB examples?

Copy link
Member

@GromNaN GromNaN left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the information about denormalizing the data helpful for users to know or is it in the technical weeds?

I'm not sure to understand your question. There is the method toSearchableArray to customize the documents that are sent to the search engine, that can be documented. And the part about retreiving ids from the search engine, then querying the database with this ids in good to know to understand the performance implications and the benefit of using atlas search directly on mongodb models.

Should the forthcoming tutorial (the TODO in this PR) that shows users how to use Scout to import into Meilisearch be centered in this page instead of the MongoDB to MongoDB examples?

I'm not certain we need to document indexation from MongoDB to an other search engine. That's already documented on the Laravel website: https://laravel.com/docs/11.x/scout
It "justs works" with MongoDB models.

rustagir reacted with thumbs up emoji
docs/scout.txt Outdated
indexes, see the :ref:`laravel-as-index` section of the Atlas
Search guide.

- Allows you to automatically replicate data from MongoDB into a
Copy link
Member

@GromNaN GromNaN Mar 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems to me that "allows" is a word to be avoided (exept when talking about permissions, security). It's better to use "enable", for example.

rustagir reacted with thumbs up emoji
@rustagir rustagir requested a review from GromNaN March 3, 2025 19:12
@rustagir rustagir changed the base branch from 5.x to 5.2 March 3, 2025 20:39
Copy link
Member

@GromNaN GromNaN left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. This is a good piece of docs.

rustagir reacted with hooray emoji
@rustagir rustagir merged commit 937fb27 into mongodb:5.2 Mar 5, 2025
62 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@GromNaN GromNaN GromNaN approved these changes

@norareidy norareidy norareidy approved these changes

Assignees

No one assigned

Labels

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /