in example above "product_property_id":40 means its color,
"product_property_id":41 is weight and now I want to fetch all pairs
of possible properties and how many results applying them will fetch,
for example:
but that leads me to another question, is there a way to fetch all
properties.keys ?
I think I'll need that to define all facets when building query that
you write above.
Document structure is as you suggested:
You can fetch field values if the field is stored.
But I think you probably want to avoid extra query for stored fields and
then running a new query with facets built on top of results from previous
query, right? Please correct me anybody if I am wrong but it is not possible
to have ES generate all facets for field values dynamically now. I remember
discussing similar functionality on #IRC some time ago and if my memory
serves me good such functionality should be available in some future
release. But it is not there yet so now you have to use an extra query
"technique" (which may not be optimal). Also if you know that number lot of
property keys is not high you can always create facets for all possible key
values (definitely not nice solution but can work good in some cases).
but that leads me to another question, is there a way to fetch all
properties.keys ?
I think I'll need that to define all facets when building query that
you write above.
Document structure is as you suggested:
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.