mybe I've overseen it; I am looking for an elegant way to write a
mapping for a document type where I can get rid of stopwords for all
strings. Setting something like "analyzer" : { "type" : "standard",
"stopwords" : "none" } for a property works fine, but how can I set
this as default for all properties of type string? Is there a way to
do so using either default or maybe dynamic_templates? I am a bit
puzzled about the syntax here. So if anyone could help with a little
code snippet, I would really appreciate this!
Name your analyzer "default", and have it the same as the standard
analyzer (standard tokenizer, standard and lowercase, without stop). This
will then be used for all string type fields.
Use index templates to create a default mapping, with a dynamic
mapping that set the analyzer to the one you configured based on match_type
of string. ( Elasticsearch Platform — Find real-time answers at scale | Elastic
the bottom explains dynamic templates for specific type mapping, in
your
case, the type is default).
mybe I've overseen it; I am looking for an elegant way to write a
mapping for a document type where I can get rid of stopwords for all
strings. Setting something like "analyzer" : { "type" : "standard",
"stopwords" : "none" } for a property works fine, but how can I set
this as default for all properties of type string? Is there a way to
do so using either default or maybe dynamic_templates? I am a bit
puzzled about the syntax here. So if anyone could help with a little
code snippet, I would really appreciate this!
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.