[DOCS-11970] The convertShardKeyToHashed usage described incorrectly Created: 16/Aug/18  Updated: 30/Oct/23  Resolved: 16/Aug/18

Status: Closed
Project: Documentation
Component/s: Server
Affects Version/s: None
Fix Version/s: Server_Docs_20231030

Type: Bug Priority: Major - P3
Reporter: Dmitry Ryabtsev Assignee: Kay Kim (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-32889 Mongo shell injection function for ha... Closed
Participants:
Days since reply: 5 years, 25 weeks, 6 days ago
Epic Link: DOCSP-1769

 Description   

----------------------------

Original Description

In the documentation here we have the following example:

convertShardKeyToHashed( { _id: ObjectId("5b2be413c06d924ab26ff9ca") } )

That is incorrect and will produce a different hash value from the one that gets produced by the server for a hashed index.

As pointed out by kevin.pulo on SERVER-32889, the correct usage would be:

convertShardKeyToHashed( ObjectId("5b2be413c06d924ab26ff9ca") )

----------------------------

Description

Scope of changes (files that need work and how much)

Impact to other docs outside of this product

MVP (work and date?)

Resources (e.g. Scope Docs, Invision)



 Comments   
Comment by Githook User [ 16/Aug/18 ]

Author:

{'name': 'kay', 'email': 'kay.kim@10gen.com', 'username': 'kay-kim'}

Message: DOCS-11970: pass in just value to convertShardKeyToHashed
Branch: master
https://github.com/mongodb/docs/commit/ccc2ffd323b08204c06d6d97cebbaefebfb968bb

Generated at Thu Feb 08 08:04:05 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.