MONGOC_BULKWRI...EOPTS_SET_HINT(3)

πŸ¦‹ MONGOC_BULKWRI...EOPTS_SET_HINT(3) πŸ¦‹

okay bestie so this one lives in the libmongoc manual, and the name got absolutely butchered by the terminal width (the full thing is mongoc_bulkwrite_replaceoneopts_set_hint, iykyk πŸ’…) β€” but the function itself? iconic. let's go.


✨ SYNOPSIS ✨

void
mongoc_bulkwrite_replaceoneopts_set_hint (mongoc_bulkwrite_replaceoneopts_t *self, const bson_value_t *hint);

so it returns void (no little gift back, she just does the thing πŸŽ€), takes your mongoc_bulkwrite_replaceoneopts_t *self, and a const bson_value_t *hint. that's the whole cast, no extras.


🌸 DESCRIPTION 🌸

okay so what does it do? it sets the hint, obviously, which is literally the index you want the query system to use. like, "hey babe, use this one." 🫢

you can pass the hint as either:

  • the index name β€” as a string πŸ“
  • or the index key pattern

and if you do specify it? the query system will only consider plans that use the hinted index. no wandering off, no "ooh what about this other index," none of that. she's committed. main character energy only πŸ‘‘βœ¨

no cap: that's the entire behavior. if you set it, the planner takes the hint and that's the vibe.

πŸ’œ AUTHOR πŸ’œ

MongoDB, Inc β€” yeah, them. the whole squad. 🫑


2009-present, MongoDB, Inc. β€” so like, a long time, fr fr. respect the elders. πŸ’€βœ¨


and that's the page!! version 2.5.6, dated Oct 09, 202… (the footer literally got cut off mid-year, so we're just gonna vibe with the mystery πŸ”₯). mwah, go set some hints bestie πŸ’–πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from