tenders-exposed / elvis-backend-node

Search and visualize public procurements for EU countries http://tenders.exposed/
MIT License
5 stars 2 forks source link

Relationship details #9

Open georgiana-b opened 6 years ago

georgiana-b commented 6 years ago

From @georgiana-b on October 16, 2017 6:15

From @georgiana-b on May 26, 2017 13:9

Currently we provide procuring_entities_details and suppliers_details routes where people can receive aggregated data and analysis on different suppliers or procurers. We also need relationship details as described in tenders-exposed/elvis-ember#201.

In our current backend this would be quite difficult to make because the relationship between 2 entities is not represented as a separate entity and is not stored in the database. This will change when we switch to a graph database and edges will finally be stored.

Our current REST interface also makes it hard to represent relationship details because people can query by suppliers or procurers only in bulk:

{                            
  "query": {
      "countries": ["BE"],
      "cpvs": ["24000000"],
      "years": [ 2008],
      "procuring_entities": [34541],
      "suppliers": [1165518, 1177785],
    }
}

So, we have to take this into consideration in the new REST interface and provide a way to query by a relationship.

Copied from original issue: tenders-exposed/elvis-backend#54

Copied from original issue: tenders-exposed/elvis-backend-py#13

georgiana-b commented 6 years ago

From @zufanka on October 11, 2017 14:11

@georgiana-b is this taken into account in the new backend?