Documentation
  1. Documentation
  2. DOCS-41

Remove all mention of using an object as location in geo docs

    Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Major - P3 Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • # Replies:
      5
    • Last comment by Customer:
      false

      Description

      Using an object is fragile since order matters and many drivers don't preserve order when fetching data. Should always use an array.

        Activity

        Hide
        Sam Kleinman
        added a comment -

        I just added the following:

        Do not refer to documents as "objects," because drivers (and MongoDB)
        do not preserve the order of fields when fetching data. If the order
        of objects matter, use an array.

        to the style guide under the "document," item in the jargon section. I don't think there are any instances of this in the Manual (nee new docs), but I think the best course of action is to get the above comment correct, and then close this ticket, and open new issues as needed against the Manual if there are specific instances of this error.

        Would you suggest a different process?

        Show
        Sam Kleinman
        added a comment - I just added the following: Do not refer to documents as "objects," because drivers (and MongoDB) do not preserve the order of fields when fetching data. If the order of objects matter, use an array. to the style guide under the "document," item in the jargon section. I don't think there are any instances of this in the Manual (nee new docs), but I think the best course of action is to get the above comment correct, and then close this ticket, and open new issues as needed against the Manual if there are specific instances of this error. Would you suggest a different process?
        Hide
        auto
        added a comment -

        Author:

        {u'login': u'tychoish', u'name': u'Sam Kleinman', u'email': u'samk@10gen.com'}

        Message: DOCS-41: style guide tweak
        Branch: master
        https://github.com/mongodb/docs/commit/1841a44f2446689701af7b3504b0644f3318b397

        Show
        auto
        added a comment - Author: {u'login': u'tychoish', u'name': u'Sam Kleinman', u'email': u'samk@10gen.com'} Message: DOCS-41 : style guide tweak Branch: master https://github.com/mongodb/docs/commit/1841a44f2446689701af7b3504b0644f3318b397
        Hide
        Mathias Stearn
        added a comment -

        To be clear, this ticket was referring to things like this on the geo page:

        "In order to use the index, you need to have a field in your object that is either a sub-object or array where the first 2 elements are x,y coordinates (or y,x - just be consistent; it might be advisable to use order-preserving dictionaries/hashes in your client code, to ensure consistency)."

        We should never mention that we support objects in the location field (even though we must for compatibility). The docs should just tell them to use an array without any other options.

        Show
        Mathias Stearn
        added a comment - To be clear, this ticket was referring to things like this on the geo page: "In order to use the index, you need to have a field in your object that is either a sub-object or array where the first 2 elements are x,y coordinates (or y,x - just be consistent; it might be advisable to use order-preserving dictionaries/hashes in your client code, to ensure consistency)." We should never mention that we support objects in the location field (even though we must for compatibility). The docs should just tell them to use an array without any other options.
        Hide
        Sam Kleinman
        added a comment -

        Updated document to reflect this.

        Show
        Sam Kleinman
        added a comment - Updated document to reflect this.
        Hide
        auto
        added a comment -

        Author:

        {u'login': u'tychoish', u'name': u'Sam Kleinman', u'email': u'samk@10gen.com'}

        Message: DOCS-41: style guide updates
        Branch: master
        https://github.com/mongodb/docs/commit/3d552509ffe6b6fffb8af5c05b694d028efed47b

        Show
        auto
        added a comment - Author: {u'login': u'tychoish', u'name': u'Sam Kleinman', u'email': u'samk@10gen.com'} Message: DOCS-41 : style guide updates Branch: master https://github.com/mongodb/docs/commit/3d552509ffe6b6fffb8af5c05b694d028efed47b

          People

          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Days since reply:
              2 years, 2 weeks, 5 days ago
              Date of 1st Reply: