I have a lot of data in my ES cluster. I'm using the _all field for general
search in my documents, but I recently found out that the standard analyzer
doesn't tokenize words with dots inside (ex: www.google.com - not found
when searching for "google").
So I want to replace the standard analyzer with the simple analyzer for the
_all field.
How do I do that? Please let me know all the steps - replacing,
re-indexing, etc.
That said, changing an analyzer one by another requires to reindex your documents.
So create a new index (or drop the old one and create it again) with new settings/mappings.
Reindex.
I have a lot of data in my ES cluster. I'm using the _all field for general search in my documents, but I recently found out that the standard analyzer doesn't tokenize words with dots inside (ex: www.google.com - not found when searching for "google").
So I want to replace the standard analyzer with the simple analyzer for the _all field.
How do I do that? Please let me know all the steps - replacing, re-indexing, etc.
The copy_to feature looks nice, but for now I'm happy using the _all
feature.
However I don't think my question was fully answered. When creating the new
index, how do I change the _all analyzer? Are you saying that I need to
change the analyzer on each of the fields I've enabled _all on?
Thanks again,
Lasse
On Thursday, October 9, 2014 11:35:30 AM UTC+2, David Pilato wrote:
Le 9 octobre 2014 à 09:46:23, Lasse Schou (lasse...@gmail.com
<javascript:>) a écrit:
Hi,
I have a lot of data in my ES cluster. I'm using the _all field for
general search in my documents, but I recently found out that the standard
analyzer doesn't tokenize words with dots inside (ex: www.google.com -
not found when searching for "google").
So I want to replace the standard analyzer with the simple analyzer for
the _all field.
How do I do that? Please let me know all the steps - replacing,
re-indexing, etc.
The copy_to feature looks nice, but for now I'm happy using the _all
feature.
Glad you're happy with the _all feature.
However I don't think my question was fully answered. When creating the
new index, how do I change the _all analyzer? Are you saying that I need to
change the analyzer on each of the fields I've enabled _all on?
For a general directory query application, I lock down Elasticsearch to
disable the _all field, prevent unmapped fields from being added, prevent
unmapped types from being added, and prevent indexes from being
automatically created with the addition of the first document.
For processing logs using the ELK stack, I disable the _all field and
specify the use of the message field as the default. Then all of my
logstash configurations use the message field but do not modify it. Then I
create the mapping I wish for the message field and all is well (no pun
intended!).
The copy_to feature looks nice, but for now I'm happy using the _all
feature.
Glad you're happy with the _all feature.
However I don't think my question was fully answered. When creating the
new index, how do I change the _all analyzer? Are you saying that I need to
change the analyzer on each of the fields I've enabled _all on?
For a general directory query application, I lock down Elasticsearch to
disable the _all field, prevent unmapped fields from being added, prevent
unmapped types from being added, and prevent indexes from being
automatically created with the addition of the first document.
For processing logs using the ELK stack, I disable the _all field and
specify the use of the message field as the default. Then all of my
logstash configurations use the message field but do not modify it. Then I
create the mapping I wish for the message field and all is well (no pun
intended!).
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.