Closed Bug 1123420 Opened 8 years ago Closed 8 years ago

Search API should return more infos about the questions


( :: Search, defect, P2)



(Not tracked)



(Reporter: rik, Assigned: mythmon)



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

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.
We can the other fields we need for now so no rush on this.
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.
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
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?
Blocks: bu-server
Whiteboard: u=api c=questions p=2 s=2015.3
Priority: -- → P2
Has it been deployed to stage? I'm not seeing the new fields:

"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
Target Milestone: --- → 2015Q1
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.
Closed: 8 years ago
Flags: needinfo?(mcooper)
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.