Skip to content

DOCSP-49622 Atlas Search #508

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

Open
wants to merge 3 commits into
base: comp-cov
Choose a base branch
from

Conversation

lindseymoore
Copy link
Collaborator

@lindseymoore lindseymoore commented Jun 5, 2025

Pull Request Info

PR Reviewing Guidelines

JIRA - https://jira.mongodb.org/browse/DOCSP-49622

Staging Links

https://deploy-preview-508--docs-golang.netlify.app/atlas-search/

Self-Review Checklist

  • Is this free of any warnings or errors in the RST?
  • Did you run a spell-check?
  • Did you run a grammar-check?
  • Are all the links working?
  • Are the facets and meta keywords accurate?
  • Are the page titles greater than 20 characters long and SEO relevant?

Copy link

netlify bot commented Jun 5, 2025

Deploy Preview for docs-golang ready!

Name Link
🔨 Latest commit 3467f3f
🔍 Latest deploy log https://app.netlify.com/projects/docs-golang/deploys/684c827a994fb80008d22122
😎 Deploy Preview https://deploy-preview-508--docs-golang.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Comment on lines +47 to +54
// Prints the results
var results []bson.D
if err = cursor.All(ctx, &results); err != nil {
panic(err)
}
for _, result := range results {
fmt.Println(result)
}
Copy link
Collaborator Author

@lindseymoore lindseymoore Jun 11, 2025

Choose a reason for hiding this comment

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

For technical reviewer: My results are not printing, and I'm not sure why. Is this correct?

Copy link
Collaborator

Choose a reason for hiding this comment

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

The code looks good to me. I guess you have not set the search index. Just as mentioned in the "atlas-search.txt":

Before running an Atlas Search query, you must create an Atlas Search index
on your collection.

Copy link
Collaborator Author

@lindseymoore lindseymoore Jun 13, 2025

Choose a reason for hiding this comment

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

It's strange that it's not printing because I do have an Atlas Search index on the title field! If nothing is wrong with this code, maybe there's something weird with how I'm creating the index on my end. I'll keep looking, thanks for checking!

@lindseymoore lindseymoore requested review from a team and qingyang-hu and removed request for a team June 11, 2025 19:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants