![]() The first vertex in paths.vertices is the starting vertex ( users/6327) Merged_reviews: UNION(my_reviews, reviews_of_who_i_follow) Reviews_of_who_i_follow: reviews_of_who_i_follow, LET my_reviews = (įOR vertices, edges, paths IN 1.1 OUTBOUND "users/6327" reviewsįOR v IN 1.1 OUTBOUND "users/6327" followsįOR vertices, edges, paths in 1.1 OUTBOUND users._id reviews Note: When providing an id on each record I used the id of the review, because if you know that id you can fetch the edge document and get the id of both the user and the place as well as read all the data about the review. reviews edge collection tracks reviews people wrote.follows edge collection tracks users following other users. ![]() places document collection contains places.users document collection contains users.It is possible to merge these queries together more optimally, but I thought it worth breaking them out like this (and showing the output of each stage as well as the final answer) to help you see what data is available.Ī key thing to understand about AQL graph queries is how you have access to vertices, edges, and paths when you perform a query.Ī path is an object in it's own right and it's worth investigating the contents of that object to better understand how to exploit it for path information. Merge together your reviews with those of the people you follow.Determine the reviews the people you follow have written.I take a different approach below, and that is to: One way is to determine the _id of your user record, then find all the _id's of the friends you follow, and then to work out all related reviews in one query. There are a number of ways to do this query, and it also depends on where you want to add parameters, but for the sake of simplicity I've built this quite verbose query below to help you understand one way of approaching the problem. Review,"review about place 2 from the user I follow" How can I get all the places that I like and the reviews of the people that I follow who also reviewed the same place that I like.Īn expected output would be something like the following: [ I also follow user 6344 which also happens to have reviewed the place 7968. I am user 6327 and I reviewed both places(793) How can I traverse the graph to fetch all the places that I like with my review of the place and the reviews of the users I follow that also like the same place.įor example, in the above graph. The "likes" edge collection also has a "review" property to store a user's review about the place.Īnd a "follows" edge collection to denote that a user follows another user. Given a collection of "users" and a collection of "places".Īnd a "likes" edge collection to denote that a user likes a certain place. To streamline the process, you will have to use the AQL calculator to get AQL sample size, limits, and all the numbers you need quickly.I am having some trouble wrapping my head around how to traverse a certain graph to extract some data. ![]() The inspection report is attached to the documents for your shipment. The inspector can conduct a pre-shipment inspection before production commences and issue a pre-shipment inspection report. If you operate in Asia, you will need pre-shipment inspection certificates. It certifies that the products pass the quality level and accompanies the shipment until it is delivered to you. The quality limits and AQL sample size will guide your AQL inspection and help the inspector to decide whether to pass or fail the shipment.Īfter completing the AQL inspection, the inspection agency will issue a shipment inspection certificate. For large orders, the best practice is to select the sample randomly from different batches over several production runs. The inspector selects the sample randomly from the shipment and inspects for defects based on the acceptable and rejectable number of defects from the AQL table. AQL inspection is a process of determining whether the percentage of defective units in shipment is acceptable before shipping to the customer.
0 Comments
Leave a Reply. |