Using documents to represent questions and answers
This is a sub-issue for #154 (moved).
The point of this issue is to define a minimum set of features for a question/answer interface to the ratings database.
Functional requirements:
-
Need to be able to ask a question. The question gets added to the documents table with the document_type of "question". The "actual" question should be used as the title of the document and the body will contain the background info for the question. Later we will probably want to support the case where the body points to an existing document, allowing for a model where we create multiple questions about a single document, but let's not worry about that now, especially as we may handle that case a different way. -
Need to be able to create answers and link answers to the question. Each answer is also a document. The answer link is creating by adding a row to the document_links table where the link_type is "answer". As part of creating the link, a impact predicate of the form "Answer X is a useful answer to Question Y" will also be created and the link will point to it. -
Need to be able to vote a percentage truth on each answer's impact predicate.
Follow-on functionality:
-
Allow comments on questions and answers. Comments are documents linked to questions and answers.
Initial UI for Question/Answer pages
These will just be new pages in the existing UI. These pages will be similar to existing document pages, but the question list page filters to only find documents that are questions, and the question page focuses on links that are answers to the question being shown.
Questions List page
- Show list of questions controlled by a filter list. Allow filtering by one or more user-specified tags (searchable tag list)
- Edit box to search for a question (searching document titles only), and if not found, create a new question from it, and supply background text for the question document.
Question page: main interface for question/answer system
This page will be somewhat similar to question/answer sites like stack exchange.
- Question title and body with normal document meta-data displayed.
- Answer list with a filter that is default ranked by total usefulness (need to get @pete to add an algorithm for this)
- Each answer shown with full body. Ability to vote on proposition for each answer.
Edited by Dan Notestein