elasticsearch representation has bespoke keys

Bug #1194907 reported by Aaron Bentley
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
charmworld
Fix Released
High
Abel Deuring

Bug Description

Elasticsearch is not a free-form data store; it uses a mapping, and that mapping has an entry for every unique key it encounters. This prevents pre-defining value types, which in turn leads to issues like bug #1176452. It also means that the mapping is so long that it is not human-readable. (The mapping for 10 charms turns out to be 1598 lines, pretty-printed.)

Instead, the representation given to elasticsearch should make all user-defined values *values*, not keys. For example:
{'foo': 'bar', 'baz': 'qux'} => [{'name': 'foo', 'value': 'bar'}, {'name': 'foo', 'value': 'qux'}]

Currently affected fields: "config.options" (but work in progress), "files", "provides", "requires", "peers".

When fixing files, it may make sense to address bug #1189992 at the same time.

Related branches

Aaron Bentley (abentley)
description: updated
Curtis Hovey (sinzui)
Changed in charmworld:
status: New → Triaged
importance: Undecided → High
Curtis Hovey (sinzui)
tags: added: elasticsearch
Revision history for this message
Curtis Hovey (sinzui) wrote :

Work on this bug has stalled. I don't think this is fixed because We need a list of the remaining user-created keys? I think options is fixed. The comments in charmworld.search imply that requires and provides use dynamic mapping. The files bug is still open.

Revision history for this message
Abel Deuring (adeuring) wrote : Re: [Bug 1194907] Re: elasticsearch representation has bespoke keys

On 16.09.2013 17:24, Curtis Hovey wrote:
> Work on this bug has stalled. I don't think this is fixed because We
> need a list of the remaining user-created keys? I think options is
> fixed. The comments in charmworld.search imply that requires and
> provides use dynamic mapping. The files bug is still open.
>

I think r393 should have fixed the bug.

Revision history for this message
Curtis Hovey (sinzui) wrote :

Oops. I was looking at a stake branch. I agree this is fixed in trunk.

Changed in charmworld:
assignee: nobody → Abel Deuring (adeuring)
status: Triaged → Fix Committed
Curtis Hovey (sinzui)
Changed in charmworld:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.