[DOCS-10375] Change description of connectFromField in table on graphLookup Created: 26/May/17  Updated: 30/Oct/23  Resolved: 10/Jun/18

Status: Closed
Project: Documentation
Component/s: manual, Server
Affects Version/s: 3.5.7
Fix Version/s: Server_Docs_20231030

Type: Bug Priority: Trivial - P5
Reporter: Federico Aguirre Assignee: Kay Kim (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

https://docs.mongodb.com/manual/reference/operator/aggregation/graphLookup/


Issue Links:
Related
is related to DOCS-7795 Document $graphLookup Closed
Participants:
Days since reply: 5 years, 35 weeks, 3 days ago
Story Points: 0.1

 Description   

In https://docs.mongodb.com/manual/reference/operator/aggregation/graphLookup/ when describing the attribute connectFromField you can read

Optionally, connectFromField may be an array of field names, each of which is individually followed through the traversal process.

I think that statement does not match the implementation, that only allows a string that is a simple field path expression.

So is this an issue on the doc or the implementation ?



 Comments   
Comment by Githook User [ 10/Jun/18 ]

Author:

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

Message: DOCS-10375: graphLookup connectFromField is field name, the field itself can contain an array
Branch: v3.6
https://github.com/mongodb/docs/commit/04632a9aa1c39f77407a0681f79e68c1b2cb0620

Comment by Githook User [ 10/Jun/18 ]

Author:

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

Message: DOCS-10375: graphLookup connectFromField is field name, the field itself can contain an array
Branch: master
https://github.com/mongodb/docs/commit/6d0882230edeca84efeb62dc658fb117e28c52c0

Comment by Mark Agarunov [ 09/Jun/17 ]

Hello federico.aguirre@bitlogic.io,

Thank you for reporting this issue. I've moved this ticket to the DOCS project so that the documentation can be updated to reflect this.

Thanks,
Mark

Comment by David Storch [ 31/May/17 ]

I agree with Asya, this looks like a documentation bug. Thanks to federico.aguirre.cardiel@gmail.com for bringing this to our attention! Recommend moving this ticket to the DOCS project.

Comment by Asya Kamsky [ 30/May/17 ]

"Optionally, connectFromField may be an array of field names, each of which is individually followed through the traversal process." that's just plain wrong. What they mean is that the VALUE of the field can be a single value that's used as "$eq" but if it's an array, it's used as "$in".

My guess is there's a DOCS ticket somewhere that got values and field names confused.

Sure enough: https://jira.mongodb.org/browse/DOCS-7795?focusedCommentId=1428364&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-1428364 says:

The "connectFromField" can be an array-valued field and each value is individually followed.

Somehow "array-valued field" became "array of field names" completely changing the meaning.

mark.agarunov what exactly did you try when you say you passed an array to "connectFromField"?

Comment by Mark Agarunov [ 30/May/17 ]

Hello federico.aguirre@bitlogic.io,

Thank you for the report. Unfortunately I am unable to reproduce the behavior you've described. After testing on 3.5.7, the version you have indicated, I am able to pass an array to connectFromField and the query works as described in the documentation. To get a better idea of what may be causing this issue, could you please provide:

  • The exact query you are using.
  • The dataset you are running this query against if possible.
  • The complete logs from mongod when you see this behavior.

Thanks,
Mark

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