workload: BI
operation: read
number: 20
title: Recruitment
description: |
  Given a *Company* `company` and a *Person* `person2` (who is known to be working at another *Company*), find a *Person* (`person1`) working the in the `company` who have the top-20 shortest path to `person2` through people who have studied together.
  On this path, we only consider edges between *Persons* who know each other and attended the same university and set the weight of the edge to the absolute difference between the year of enrolment plus 1 (`studyAt.classYear + 1`).

  If there are multiple *Person* `person1` nodes with the same shortest path, return all of them.
parameters:
  - name: company
    type: Long String
    description: "*Companies* with a similar number of employees (former or current) are selected"
  - name: person2Id
    type: ID
result:
  - name: person1.id
    type: ID
  - name: totalWeight
    type: 64-bit Integer
    category: calculated
sort:
  - name: person1.id
    direction: asc
limit: 20
choke_points: [3.3, 7.6, 7.7, 8.4, 8.6]
relevance: |
  Implementations can either pre-compute edge weights or compute them on-the-fly.
  To find a weighted shortest path efficiently, implementations can use e.g. a bidirectional Dijkstra algorithm.

workload: BI
operation: read
number: 20
title: Recruitment
description: |
  Given a *Company* `company` and a *Person* `person2` (who is known to be working at another *Company*), find a *Person* (`person1`) working the in the `company` who have the top-20 shortest path to `person2` through people who have studied together.
  On this path, we only consider edges between *Persons* who know each other and attended the same university and set the weight of the edge to the absolute difference between the year of enrolment plus 1 (`studyAt.classYear + 1`).

  If there are multiple *Person* `person1` nodes with the same shortest path, return all of them.
parameters:
  - name: company
    type: Long String
    description: "*Companies* with a similar number of employees (former or current) are selected"
  - name: person2Id
    type: ID
result:
  - name: person1.id
    type: ID
  - name: totalWeight
    type: 64-bit Integer
    category: calculated
sort:
  - name: totalWeight
    direction: desc
  - name: person1.id
    direction: asc
limit: 20
choke_points: [3.3, 7.6, 7.7, 8.4, 8.6]
relevance: |
  Implementations can either pre-compute edge weights or compute them on-the-fly.
  To find a weighted shortest path efficiently, implementations can use e.g. a bidirectional Dijkstra algorithm.

Add more sorting to Q20 results
Add more sorting to Q20 results
