elasticsearch 点替换不起作用-Elasticsearch,elasticsearch,logstash,elasticsearch,Logstash" /> elasticsearch 点替换不起作用-Elasticsearch,elasticsearch,logstash,elasticsearch,Logstash" />

elasticsearch 点替换不起作用-Elasticsearch

elasticsearch 点替换不起作用-Elasticsearch,elasticsearch,logstash,elasticsearch,Logstash,我有以下Elasticsearch索引的配置 PUT dottest { "settings":{ "index" : { "number_of_shards" : 1, "number_of_replicas" : 0 }, "analysis": { "analyzer": { "splchar_analyzer": { "tokenizer&

我有以下Elasticsearch索引的配置

PUT dottest
{
"settings":{
"index" : {
"number_of_shards" : 1,
"number_of_replicas" : 0
},
"analysis": {
"analyzer": {
"splchar_analyzer": {
"tokenizer": "standard",
"char_filter": [
"spl_char_filter"
],
"filter": [
"lowercase"
]
}
},
"char_filter": {
"spl_char_filter": {
"type": "pattern_replace",
"pattern": "\.",
"replacement": " "
}
}
}
},
"mappings": {
"properties": {
"text": {
"type": "text",
"analyzer": "splchar_analyzer"
}
}
}
}
它的工作,而检查使用以下要求

POST dottest/_analyze
{
"analyzer": "splchar_analyzer",
"text": """This is something 152045.525"""
}
我得到了下面的令牌,这对我来说很好

{
"tokens" : [
{
"token" : "this",
"start_offset" : 0,
"end_offset" : 4,
"type" : "",
"position" : 0
},
{
"token" : "is",
"start_offset" : 5,
"end_offset" : 7,
"type" : "",
"position" : 1
},
{
"token" : "something",
"start_offset" : 8,
"end_offset" : 17,
"type" : "",
"position" : 2
},
{
"token" : "152045",
"start_offset" : 18,
"end_offset" : 24,
"type" : "",
"position" : 3
},
{
"token" : "525",
"start_offset" : 25,
"end_offset" : 28,
"type" : "",
"position" : 4
}
]
}
当文档通过logstash脚本插入时,它不会用空格吐点。 以下是实时索引文档示例:

{
"_index" : "indexname",
"_type" : "_doc",
"_id" : "1278041941",
"_version" : 2,
"found" : true,
"took" : 142,
"term_vectors" : {
"filecontent" : {
"field_statistics" : {
"sum_doc_freq" : 2848226634,
"doc_count" : 18534325,
"sum_ttf" : 6310068234
},
"terms" : {
"5961.20" : {
"term_freq" : 1,
"tokens" : [
{
"position" : 20,
"start_offset" : 145,
"end_offset" : 152
}
]
},
"6119.27" : {
"term_freq" : 1,
"tokens" : [
{
"position" : 23,
"start_offset" : 167,
"end_offset" : 174
}
]
},
"6153.10" : {
"term_freq" : 1,
"tokens" : [
{
"position" : 17,
"start_offset" : 123,
"end_offset" : 130
}
]
},
"6339.60" : {
"term_freq" : 1,
"tokens" : [
{
"position" : 14,
"start_offset" : 101,
"end_offset" : 108
}
]
},
"6819.20" : {
"term_freq" : 1,
"tokens" : [
{
"position" : 11,
"start_offset" : 79,
"end_offset" : 86
}
]
},
"document" : {
"term_freq" : 2,
"tokens" : [
{
"position" : 1,
"start_offset" : 8,
"end_offset" : 16
},
{
"position" : 3,
"start_offset" : 22,
"end_offset" : 30
}
]
},
"for" : {
"term_freq" : 1,
"tokens" : [
{
"position" : 5,
"start_offset" : 34,
"end_offset" : 37
}
]
},
"hrs" : {
"term_freq" : 5,
"tokens" : [
{
"position" : 10,
"start_offset" : 71,
"end_offset" : 74
},
{
"position" : 13,
"start_offset" : 93,
"end_offset" : 96
},
{
"position" : 16,
"start_offset" : 115,
"end_offset" : 118
},
{
"position" : 19,
"start_offset" : 137,
"end_offset" : 140
},
{
"position" : 22,
"start_offset" : 159,
"end_offset" : 162
}
]
},
"is" : {
"term_freq" : 1,
"tokens" : [
{
"position" : 4,
"start_offset" : 31,
"end_offset" : 33
}
]
},
"labor" : {
"term_freq" : 5,
"tokens" : [
{
"position" : 9,
"start_offset" : 65,
"end_offset" : 70
},
{
"position" : 12,
"start_offset" : 87,
"end_offset" : 92
},
{
"position" : 15,
"start_offset" : 109,
"end_offset" : 114
},
{
"position" : 18,
"start_offset" : 131,
"end_offset" : 136
},
{
"position" : 21,
"start_offset" : 153,
"end_offset" : 158
}
]
},
"only" : {
"term_freq" : 1,
"tokens" : [
{
"position" : 8,
"start_offset" : 54,
"end_offset" : 58
}
]
},
"purpose" : {
"term_freq" : 1,
"tokens" : [
{
"position" : 7,
"start_offset" : 46,
"end_offset" : 53
}
]
},
"testing" : {
"term_freq" : 2,
"tokens" : [
{
"position" : 0,
"start_offset" : 0,
"end_offset" : 7
},
{
"position" : 6,
"start_offset" : 38,
"end_offset" : 45
}
]
},
"this" : {
"term_freq" : 1,
"tokens" : [
{
"position" : 2,
"start_offset" : 17,
"end_offset" : 21
}
]
}
}
}
}
}
下面的文字不吐

工时:-6819.20 工时:-6339.60 工时:-6153.10 工时:-5961.20 工时:-6119.27

映射或日志存储中是否存在任何问题? 有人能帮我解决这个问题吗


谢谢

您的日志存储配置是什么?是否输出到相同的索引名?在粘贴的示例中,您为索引
dottest
创建了一个
analyzer
,并且日志存储输出显示索引为
indexname