wu-sheng closed pull request #808: Change the elasticsearch analyzer type to
stop that can tokenizer the?
URL: https://github.com/apache/incubator-skywalking/pull/808
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git
a/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/base/define/ElasticSearchStorageInstaller.java
b/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/base/define/ElasticSearchStorageInstaller.java
index c6ede5dce..7f99754b3 100644
---
a/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/base/define/ElasticSearchStorageInstaller.java
+++
b/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/base/define/ElasticSearchStorageInstaller.java
@@ -16,20 +16,19 @@
*
*/
-
package org.apache.skywalking.apm.collector.storage.es.base.define;
import java.io.IOException;
import java.util.List;
+import org.apache.skywalking.apm.collector.client.Client;
import
org.apache.skywalking.apm.collector.client.elasticsearch.ElasticSearchClient;
+import org.apache.skywalking.apm.collector.core.data.ColumnDefine;
+import org.apache.skywalking.apm.collector.core.data.TableDefine;
import org.apache.skywalking.apm.collector.storage.StorageInstaller;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.index.IndexNotFoundException;
-import org.apache.skywalking.apm.collector.client.Client;
-import org.apache.skywalking.apm.collector.core.data.ColumnDefine;
-import org.apache.skywalking.apm.collector.core.data.TableDefine;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -82,9 +81,7 @@ private Settings
createSettingBuilder(ElasticSearchTableDefine tableDefine) {
.put("index.number_of_replicas", indexReplicasNumber)
.put("index.refresh_interval",
String.valueOf(tableDefine.refreshInterval()) + "s")
- .put("analysis.analyzer.collector_analyzer.tokenizer",
"collector_tokenizer")
- .put("analysis.tokenizer.collector_tokenizer.type", "standard")
- .put("analysis.tokenizer.collector_tokenizer.max_token_length", 5)
+ .put("analysis.analyzer.collector_analyzer.type", "stop")
.build();
}
@@ -100,7 +97,7 @@ private XContentBuilder
createMappingBuilder(ElasticSearchTableDefine tableDefin
mappingBuilder
.startObject(elasticSearchColumnDefine.getName())
.field("type",
elasticSearchColumnDefine.getType().toLowerCase())
- .field("fielddata", true)
+ .field("analyzer", "collector_analyzer")
.endObject();
} else {
mappingBuilder
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services