I want to save a filter over a category-field (with about 5 distinct
values) of my Elasticsearch documents and ask me if I could use
different field names for every category instead.
F.ex. instead of the fields:
"category", "date"
I would use
"dateRed", "dateBlue", "dateGreen"
So to get all dates from category red I could use "dateRed" instead of
"date && Filter(category=Red)".
I know, I could use different types for every category, but the
documents share some common fields together.
Does Elasticsearch scale well when I use lot of different fields (~100
fields) in my documents or is it better to keep the field number small?
I would suggest to experiment and see what you find. I've created indexes
with 10 fields, and others with hundreds of fields. Performance should not
be a problem (but experiment anyway). I would be more concerned with
maintainability/usability of your index, i.e. is it easier for you/your
clients to query your index using normalized fields or denormalized fields.
On Wednesday, January 22, 2014 7:38:12 AM UTC-5, Bernhard Berger wrote:
I want to save a filter over a category-field (with about 5 distinct
values) of my Elasticsearch documents and ask me if I could use
different field names for every category instead.
F.ex. instead of the fields:
"category", "date"
I would use
"dateRed", "dateBlue", "dateGreen"
So to get all dates from category red I could use "dateRed" instead of
"date && Filter(category=Red)".
I know, I could use different types for every category, but the
documents share some common fields together.
Does Elasticsearch scale well when I use lot of different fields (~100
fields) in my documents or is it better to keep the field number small?
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.