How to store dynamic fields?

(johnrodey) #1

I have a hashmap that I want to be searchable and can always have unique keys, let's say my first map is...


The next map may have different values, say...


I want a user to be able to search for characteristics.brickcolor=brown or characteristics.cost>=50000. So far I have accomplished this by using nested types, like...


This works great for search, but here's my question. How do I store all the fields that get created, without enabling the _source field?

This doesn't seem to work:
"characteristics":{"type":"nested", "store":"yes"},

Do I need to use dynamic templates? Note that I still want to allow elasticsearch to auto define my types for these fields. Any help is greatly appreciated!!!

(johnrodey) #2


(system) #3