Search API should return more infos about the questions

RESOLVED FIXED in 2015Q1

Status

P2
normal
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: rik, Assigned: mythmon)

Tracking

unspecified
2015Q1
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: u=api c=questions p=2 s=2015.3)

(Reporter)

Description

4 years ago
Currently, the API only returns titles and ids. That means we need to issue at least another request for more details to display a question. This will be slow for people on low latency connections.
(Reporter)

Comment 1

4 years ago
We can the other fields we need for now so no rush on this.
(Assignee)

Comment 2

4 years ago
What fields would you want? I expected this would only be used for generating a page of links, but I could imagine wanting all the data in the question fields too. Or did you imagine something in between?

This view pulls from ElasticSearch instead of the database, so the fields are a bit different. The same data should be available, but it's a little more complex than other API views.
(Reporter)

Comment 3

4 years ago
The current UX/Visual specs are showing the last activity, the metadatas, the number of comments. That's for questions.

For documents, I think it is returning enough information. Title and summary for display, slug for linking.
Summary: Search API should return more infos about the documents and questions → Search API should return more infos about the questions
(Assignee)

Comment 4

4 years ago
Ah, I should consult the UI/UX more often. I think some of that (in particular the metadata) won't be in ES, so we'll have to grab it from the database. At that point, it's easiest to just include all the same data that are in the normal API responses, by re-using the serializer. Does that sound ok?
(Reporter)

Comment 5

4 years ago
Definitely!
(Assignee)

Updated

4 years ago
Blocks: 1061529
(Assignee)

Updated

4 years ago
Whiteboard: u=api c=questions p=2 s=2015.3
(Assignee)

Updated

4 years ago
Priority: -- → P2
(Reporter)

Comment 9

4 years ago
Has it been deployed to stage? I'm not seeing the new fields:

http https://support.allizom.org/api/2/search/suggest/\?q\=appel\&max_questions\=3\&max_documents\=3\&locale\=fr\&format\=json
"questions": [
  {
    "id": 1010740, 
    "title": "appel"
  }
]
Flags: needinfo?(mcooper)
This isn't deployed yet. I think we have an issue with deploys we need to fix first.
Assignee: nobody → mcooper
Status: NEW → ASSIGNED
Target Milestone: --- → 2015Q1
(Assignee)

Comment 11

4 years ago
The blocker (bug 1129717) has been figured out, and so this was deployed to stage. The command in comment 9 now lists a lot more data about the questions.
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Flags: needinfo?(mcooper)
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.