Update .security analyzer

This commit is contained in:
Josh Brower
2021-02-17 16:37:31 -05:00
parent cda36f178b
commit d2a74c80e2

View File

@@ -12,20 +12,18 @@
"analyzer": { "analyzer": {
"es_security_analyzer": { "es_security_analyzer": {
"type": "custom", "type": "custom",
"filter": [ "path_hierarchy_pattern_filter", "lowercase" ], "char_filter": [ "whitespace_no_way" ],
"tokenizer": "whitespace" "filter": [ "lowercase", "trim" ],
}, "tokenizer": "keyword"
"es_security_search_analyzer": {
"type": "custom",
"filter": [ "lowercase" ],
"tokenizer": "whitespace"
},
"es_security_search_quote_analyzer": {
"type": "custom",
"filter": [ "lowercase" ],
"tokenizer": "whitespace"
} }
}, },
"char_filter": {
"whitespace_no_way": {
"type": "pattern_replace",
"pattern": "(\\s)+",
"replacement": "$1"
}
},
"filter" : { "filter" : {
"path_hierarchy_pattern_filter": { "path_hierarchy_pattern_filter": {
"type" : "pattern_capture", "type" : "pattern_capture",
@@ -35,6 +33,12 @@
"((?:[^/]*/)*)(.*)" "((?:[^/]*/)*)(.*)"
] ]
} }
},
"tokenizer": {
"path_tokenizer": {
"type": "path_hierarchy",
"delimiter": "\\"
}
} }
} }
}, },
@@ -67,13 +71,12 @@
"type": "text", "type": "text",
"fields": { "fields": {
"keyword": { "keyword": {
"ignore_above": 32765,
"type": "keyword" "type": "keyword"
}, },
"security": { "security": {
"type": "text", "type": "text",
"analyzer": "es_security_analyzer", "analyzer": "es_security_analyzer"
"search_analyzer": "es_security_search_analyzer",
"search_quote_analyzer": "es_security_search_quote_analyzer"
} }
} }
} }