dimagi/commcare-hq — pull request #522 by dmyung (2013-06-23 16:11:37+00:00)
Title: Expand case xform pillows

creates reportxform and reportcase pillow.

some quirks that are up for discussion though.

1: it tries to retain the same mapping structure as the `CasePillow` and `XFormPillow`, so for those KNOWN properties, the queries are unchanged.

2: however with `dynamic=true`, we had to make some transforms to the data so as to prevent indexing failures. so all dynamic types (eg, stuff not know in the predefined mapping), those propertie are all converted to dicts if they are non-list and non-objects, they are now `{"#value": "foo" }`

These `#value` dict values now are dynamic template to multi_field every pillow for whitespace tokenization as well as not_analyzed for exact matching and sorting capabilities.

note, everything is a string, for better or for worse.

added readme for a checklist of stuff to do when you want to add a new pillow

this merges @yedi and his s-hist2 pull request due to the case indexing changes he added.

also add dynamic_templates for case blocks in xforms and treating those as nested.

consolidate hqpillow functionality to reduce boilerplate code use.