Things I Wish I'd Known About Elasticsearch When I Started Use It As NoSQL
Jimin Hsieh
Agenda
Summary
What is Elasticsearch?
Architecture
Inverted Index
Analogy between ES and SQL
Document
{
"_index": "hanmvngj",
"_type": "stresstest",
"_id": "7y2lLXkB3FI9wq1OkmCn",
"_score": 1,
"_source": {
"f": "amhksvjeocyogkmlzibvmpakuc",
"i": "xcwclqmpniijqgeebapkspmcfvzqoypitjvzbcqtba",
"ak": "gtomqdwncpymlvfljsnhufojytjqouvxsuidoqwtttplvrm",
"qnxxdsf": "gqrktshotoqijetacvbnqbpdhbumhomuutbiqdqjsfqros",
"qhxcumzqc": "kuiwcgnrcpzggeldypdvnijq",
"hwx": "cyexgvrrcdismskdcflwgytcijkoibuvsqxijlgwlxjv",
"eih": "x"
}
}
Mapping
{
"hanmvngj": {
"mappings": {
"properties": {
"afh": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
}
}
}
}
}
Data Type
Mapping
Mapping
Text vs Keyword
| Analyzer | Structured | Example |
Keyword | No | Structured Content | Service Name, Log Level, IP…etc |
Text | Yes | Unstructured�Content | Log |
Analyzer
Pagination
Must vs Filter
Increase write throughput
Turn Off Replica
Index Refresh Interval
Mapping Explosion
Spark Elasticsearch
Java API
Reference
FAQ
Thank you for your attention.