Hi all,
I want to index an object which has some static fields and dynamic fields
(kept in HashMap) holding Product technical feature name and value pair.You
can guess that there are thousands of different product types from various
product categories which cause 1000s of different technical
features/attributes.
Each technical feature value starts with f_ so I applied a mapping
something like below.
- dynamic_templates: [
- {
- template_feature: {
- mapping: {
- type: multi_field
- fields: {
- {name}: {
- type: {dynamic_type}
- index: analyzed
}
- org: {
- type: {dynamic_type}
- index: not_analyzed
}
}
}
- {name}: {
- match: f_*
}
}
]
- mapping: {
- template_feature: {
- {
However, when I check mapping I see that ElasticSearch creates a mapping
for each inserted technical feature. So it means when product list grows;
mapping will significantly grow and there are about total 2000 different
technical feature value.
- f_material: {
- type: multi_field
- fields: {
- f_material: {
- type: string
}
- type: string
- org: {
- type: string
- index: not_analyzed
- omit_norms: true
- index_options: docs
- include_in_all: false
}
}
}
- f_material: {
- f_period_type: {
- type: multi_field
- fields: {
- f_period_type: {
- type: string
}
- type: string
- org: {
- type: string
- index: not_analyzed
- omit_norms: true
- index_options: docs
- include_in_all: false
}
}
}
- f_period_type: {
- f_production_type: {
- type: multi_field
- fields: {
- f_production_type: {
- type: string
}
- type: string
- org: {
- type: string
- index: not_analyzed
- omit_norms: true
- index_options: docs
- include_in_all: false
}
}
}
- f_production_type: {
- f_size: {
- type: multi_field
- fields: {
- f_size: {
- type: string
}
- type: string
- org: {
- type: string
- index: not_analyzed
- omit_norms: true
- index_options: docs
- include_in_all: false
}
}
}
- f_size: {
- f_style: {
- type: multi_field
- fields: {
- f_style: {
- type: string
}
- type: string
- org: {
- type: string
- index: not_analyzed
- omit_norms: true
- index_options: docs
- include_in_all: false
}
}
}
- f_style: {
I applied this mapping just to perform a faceted search without whitespace
tokenization; but I think it is not the correct way.
Could you please advice the correct way to do this?
KR,
Onur
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.