Created
May 20, 2012 10:16
-
-
Save darklow/2757570 to your computer and use it in GitHub Desktop.
Elasticsearch log mapping
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Index config | |
{ | |
"number_of_shards": 5, | |
"number_of_replicas": 1, | |
"analysis": { | |
"analyzer": { | |
"log_analyzer": { | |
"type": "custom", | |
"tokenizer": "pattern", | |
"filter": [ | |
"lowercase" | |
] | |
} | |
} | |
} | |
} | |
// Mapping | |
{ | |
"_all": { | |
"enabled": false | |
}, | |
"index_analyzer": "log_analyzer", | |
"search_analyzer": "log_analyzer", | |
"properties": { | |
"uid": { | |
"type": "integer" | |
}, | |
"time": { | |
"store": "yes", // Not sure about this | |
"type": "integer" | |
}, | |
"date": { | |
"type": "date" | |
}, | |
"title": { | |
"type": "string" | |
}, | |
"ip": { | |
"index": "not_analyzed", | |
"type": "string" | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment