Charmworld indexes far too many fields due to Elasticsearch dynamic mapping
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| charmworld |
High
|
Unassigned |
Bug Description
Dynamic mapping is Charmworld's default behaviour, but it hurts us because sometimes it gets the type wrong, and the ultimate mapping is gigantic (more than 400k pretty-printed).
The dynamic mappings give is no advantage because we don't search on those fields. We search on specific fields. It should be disabled.
Related branches
- Abel Deuring (community): Approve on 2013-08-20
- Curtis Hovey (community): Approve (code) on 2013-08-20
-
Diff: 263 lines (+144/-10)5 files modifiedcharmworld/migrations/versions/016_fixed_ES_mapping_for_charms.py (+8/-0)
charmworld/migrations/versions/tests/test_migrations.py (+20/-0)
charmworld/search.py (+51/-4)
charmworld/tests/test_models.py (+6/-5)
charmworld/tests/test_search.py (+59/-1)
tags: | added: elasticsearch |
Curtis Hovey (sinzui) wrote : | #1 |
Abel Deuring (adeuring) wrote : Re: [Bug 1206659] Re: Charmworld indexes far too many fields due to Elasticsearch dynamic mapping | #2 |
On 16.09.2013 17:50, Curtis Hovey wrote:
> Work on this has stalled. The comments in charmworld.search indicate
> that the mapping can switch to static. I believe the blocking issue is
> bug 1194907.
>
I think r393 should have fixed the bug.
Curtis Hovey (sinzui) wrote : | #3 |
I think bundles are dynamic. I see
with translate_error():
try:
for (name, properties, dynamic) in (
I suspect that we can change bundled to dynamic=False, or remove the opportunity to accidentally pass dynamic=True:
with translate_error():
try:
for (name, properties) in (
Abel Deuring (adeuring) wrote : | #4 |
Right, bundles still have a dynamic mapping. Sorry I simply forgot about them when I wrote my last comment...
Work on this has stalled. The comments in charmworld.search indicate that the mapping can switch to static. I believe the blocking issue is bug 1194907.