title: Arangodb Java-driver Sort paths
body: <p>Please, can you explain me how I can sort paths. Now I have next code</p>
  
  <pre><code>TraversalOptions options = new TraversalOptions()
                      .edgeCollection("edges")
                      .startVertex("nodes/9149892904413851091")
                      .verticesUniqueness(TraversalOptions.UniquenessType.path)
                      .direction(TraversalOptions.Direction.any)
                      .strategy(TraversalOptions.Strategy.depthfirst)
                      .order(TraversalOptions.Order.preorder)
                      .minDepth(5)
                      .maxDepth(5);
              System.out.println("1");
              TraversalEntity&lt;BaseDocument, BaseEdgeDocument&gt; traversal = 
              db.executeTraversal(BaseDocument.class, BaseEdgeDocument.class, options);
  </code></pre>
  
  <p>How I understand <code>.sort</code> method in options will sort edges. But I want to sort paths. Any ideas?</p>
  
  <p>I need to test two cases: 
   1. sort by length of paths  ( so I will find the shortest path)
   2. sort by sum of relationships' weights   (so i will be able to find a path with the less weight)</p>