Merge pull request #340 from lblod/fix/identifier-index

Fix: add an alphanumeric only index field for identifiers
This commit is contained in:
Alexander van den Berghe
2023-10-09 11:07:32 +00:00
committed by GitHub
2 changed files with 28 additions and 4 deletions

View File

@@ -67,6 +67,18 @@
"type": "custom",
"char_filter": [],
"filter": ["lowercase", "trim", "asciifolding"]
},
"identifier_normalizer": {
"type": "custom",
"char_filter": ["identifier_alphanumeric_filter"],
"filter": ["lowercase", "trim", "asciifolding"]
}
},
"char_filter": {
"identifier_alphanumeric_filter": {
"type": "pattern_replace",
"pattern": "[^a-zA-Z0-9]",
"replacement": ""
}
}
}
@@ -857,9 +869,9 @@
"identifier": {
"type": "text",
"fields": {
"field": {
"index": {
"type": "keyword",
"normalizer": "custom_sort_normalizer"
"normalizer": "identifier_normalizer"
}
}
}

View File

@@ -39,6 +39,18 @@
"type": "custom",
"char_filter": [],
"filter": ["lowercase", "trim", "asciifolding"]
},
"identifier_normalizer": {
"type": "custom",
"char_filter": ["identifier_alphanumeric_filter"],
"filter": ["lowercase", "trim", "asciifolding"]
}
},
"char_filter": {
"identifier_alphanumeric_filter": {
"type": "pattern_replace",
"pattern": "[^a-zA-Z0-9]",
"replacement": ""
}
}
}
@@ -830,9 +842,9 @@
"identifier": {
"type": "text",
"fields": {
"field": {
"index": {
"type": "keyword",
"normalizer": "custom_sort_normalizer"
"normalizer": "identifier_normalizer"
}
}
}