I am trying to use pattern replace to change a number reference to a domain:
url -XPUT "http://localhost:9200/timeordered?pretty" -H 'Content-Type: application/json' -d'
{
"settings": {
"index.mapping.ignore_malformed": false,
"index": {
"analysis": {
"analyzer": {
"my_analyzer": {
"tokenizer": "keyword",
"char_filter": [
"my_char_filter"
]
}
},
"char_filter": {
"my_char_filter": {
"type": "mapping",
"mappings": [
"45941455 => domain.de",
"45941671 => domain.es",
"45941287 => domain.com",
"45941554 => domain-domain.fr",
"48031837 => domain1.com",
"13042264 => domain-cloud.com",
"13042207 => domain3.com",
"13157590 => domain4.com",
"13057180 => domain5.com",
"15076396 => domain6.cl",
"13133866 => domain7.com",
"15076060 => domain8.com.ar",
"15076411 => domain9.com.au",
"15076303 => domain10.com.co",
"15076393 => domain11.com.mx",
"15076408 => domain12.es",
"15076405 => domain13.fr",
"15076402 => domain14.jp",
"13040731 => domain15.com"
]
}
}
}
}
},
"mappings": {
"logs": {
"properties": {
"EdgeStartTimestamp": {
"type": "date",
"format": "epoch_millis"
},
"geoip.location": {
"type": "geo_point"
}
}
}
}
}'
However when I push data via the bulk api the field is not being converted.
Now I am guessing I either have to add this to my bulk api format or call it in the mapping of the field i need reindexing this being:
curl -s -XPUT 'http://localhost:9200/timeordered/_mapping/**ZoneID**?pretty' -d'
{
"properties": {
"ZoneID": {
"type": "string",
"index": "not_analyzed"
}
}
The bulk api format i have (not this is JQ that processes the file to bulk import)
{"index": {"_index": "timeordered", "_type": "logs", "_id": .ID, "pipeline": "geoip-timeordered"}},
Any advice would be great!
Thanks