Closed Bug 892618 Opened 11 years ago Closed 11 years ago

Improve ElasticSearch indexing of application version listings

Categories

(Marketplace Graveyard :: API, defect, P2)

defect

Tracking

(Not tracked)

VERIFIED FIXED
2013-08-01

People

(Reporter: chuck, Assigned: robhudson)

Details

Rob has some ideas for indexing application versions in the API. It is current served as such:

"current_version": "1.1",
"versions": {
  "1.0": "/api/v1/apps/versions/7012/",
  "1.1": "/api/v1/apps/versions/7930/"
}

But this requires a bit of a cheat in the mapping. To keep indexes smaller and searches faster, we should index like this:

"current_version": "1.1",
"versions": [{
  "version": "1.0",
  "resource_uri": "/api/v1/apps/versions/7012/"}, {
  "version": "1.1",
  "resource_uri": "/api/v1/apps/versions/7930/"
}]

And flatten on the way out.
Assignee: nobody → robhudson.mozbugs
Priority: -- → P2
https://github.com/mozilla/zamboni/commit/7456461
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2013-07-25
Can you please add some STRs to this bug or mark it as [qa-] ?
I've changed the way we store versions in elasticsearch. If you could, please verify via the API that versions come out in the form:

"versions": {
  "1.0": "/api/v1/apps/versions/7012/",
  "1.1": "/api/v1/apps/versions/7930/"
}

1. Search for an app, watching the network panel.
2. Verify that the JSON result from the search API for a packaged app with multiple versions contains a "versions" attribute like the above.
We had to back this patch out because it broke our production push.  This needs to fail gracefully using an old version of the index before the new one exists.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Target Milestone: 2013-07-25 → 2013-08-01
(In reply to Wil Clouser [:clouserw] from comment #4)
> We had to back this patch out because it broke our production push.  This
> needs to fail gracefully using an old version of the index before the new
> one exists.

Roger that. I can pick this up again and ensure it doesn't break on top of old data.
https://github.com/mozilla/zamboni/commit/a6e9242
Status: REOPENED → RESOLVED
Closed: 11 years ago11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.