DB Mappings
20171203 version
Cofacts uses elasticsearch to store all its data, event the relational ones. Elasticsearch "schema", or the index mappings, are defined in rumors-db.
This document contains a visualization of the schema and the reason behind such design.
Mapping
Requirements
The DB structure above is to fulfill the requirements mentioned in https://github.com/cofacts/rumors-api/issues/35 , including:
Filters
- Get articles I have replied
- Get articles with all replies having only negative feedbacks
- Get articles that has replies marked with "Contains truth" / "Contains misinformation" / "Not artile"
- Article tag (TBD in cofacts/api#32)
Sortings
- Using the last reported time
Future directions
not supported yet, but should be available by adding fields or cached fields
- Editors would like to know if there are any new replies from the other editors to the articles they have already replied to. http://beta.hackfoldr.org/cofacts/https%253A%252F%252Fhackmd.io%252Fs%252FHJy19V-E-
- Editors want their own personalized page: ee their reply number, number of articles replied by them, and "draft replies" (TBD) / inbox scenario
- Sorts article by number of "Contains truth" replies / Sorts article by the number of "Contains truth", subtract number of "contains misinformation"
Design choice