-
Notifications
You must be signed in to change notification settings - Fork 34
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
base: comp-cov
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for docs-golang ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
// Prints the results | ||
var results []bson.D | ||
if err = cursor.All(ctx, &results); err != nil { | ||
panic(err) | ||
} | ||
for _, result := range results { | ||
fmt.Println(result) | ||
} |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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!
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