mozilla/zamboni — pull request #891 by ngokevin (2013-07-12 23:18:50+00:00)
Title: store cats as slugs in ES to fix linux app installs (bug 876293)

Linux webapp installs on Marketplace were breaking because Firefox clients expected categories to be slugs (strings), not IDs (integers). Categories are passed into app installs for Linux to get them into proper system application categories. The categories' IDs have no meaning to clients outside of Zamboni.

1. Store categories into ElasticSearch by their slugs and not by their IDs. Done by changing the mapping.
2. When querying/filtering ES, query/filter with slug.
3. When dehydrating, cast categories as slugs.

This involves changing the API. The search API already can accept both IDs or slugs. The search form is changed to clean the category to its slug and ES queries also changed to use slugs.