Is there a way to use Elasticsearch to implement picklists WITHOUT storing all the data?
For example, say I have the following data:
POST food/dessert/1
{
"name" : "banana creme pie",
"type" : "pie"
}
POST food/dessert/2
{
"name" : "tiramisu",
"type" : "cake"
}
POST food/dessert/3
{
"name" : "black forest",
"type" : "cake"
}
POST food/dessert/4
{
"name" : "tiramisu",
"type" : "cake"
}
I'm making an application that shows you all the possible values for any field, so if you're searching for "type", it'll show you "cake" and "pie". If you're searching for "name", it'll show you "tiramisu", "black forest", etc..
Note that there's a lot of duplicate data here. "cake" is repeated multiple times. All I really need to store is a set of strings for each field.
I'm not sure if I'm trying to force Elasticsearch onto my problem or I'm not seeing how to use Elasticsearch correctly.
Please advice. Thanks in advance!