this is my index with settings and mapping
PUT /demo?update_all_types=true
{
"settings": {
"index": {
"indices": {
"fielddata": {
"cache": {
"cleanup_interval": "1h"
}
}
},
"mappings": {
"motadata_type": {
"dynamic_templates": [
{
"not_analyzed": {
"match": "*",
"match_mapping_type": "string",
"mapping": {
"type": "string",
"analyzer": "not_analyzed"
}
}
}
]
}
},
"compound_on_flush": "false",
"refresh_interval": "-1",
"number_of_shards": "4",
"compound_format": "false",
"creation_date": "1466404451223",
"analysis": {
"analyzer": {
"default": {
"type": "keyword"
}
}
},
"number_of_replicas": "1",
"uuid": "hbjUgpNvQkGn-uXyjppCXw",
"version": {
"created": "2030199"
}
}
},
"mappings": {
"syslog-parser": {
"_routing": {
"required": true
},
"properties": {
"raw-message": {
"type": "string",
"analyzer": "standard"
}
}
},
"linux-metric-collector": {
"_routing": {
"required": true
},
"properties": {
"network-in-traffic": {
"type": "long"
},
"os-name": {
"type": "string"
},
"raw-message": {
"type": "string",
"analyzer": "standard"
},
"sec-dept-id": {
"type": "string"
},
"source-type": {
"type": "string"
},
"status": {
"type": "string"
},
"status-code": {
"type": "long"
},
"timestamp": {
"type": "date",
"format": "strict_date_optional_time||epoch_millis"
},
"timezone": {
"type": "string"
},
"uptime": {
"type": "string"
},
"vendor ": {
"type": "string"
}
}
}
}
}
this is my data
PUT demo/linux-metric-collector/1?routing=192.168.1.117
{
"memory": 81,
"timezone": "-12:00",
"os-name": "GNU/Linux",
"cpu-cores": 2,
"network-in-traffic": 0,
"vendor ": "GenuineIntel",
"uptime": "0 days 5 hours 2 minutes",
"status": "up"
}
in this data i want to search in os-name is GNU/Linux but it not search any thing
my query
GET demo/_search
{
"query": {
"query_string": {
"query": "os-name:Linux"
}
},
"aggs":
{
"demo1":{
"terms":{
"field":"os-name"
}
}
}
}
it will return this
{
"took": 8,
"timed_out": false,
"_shards": {
"total": 4,
"successful": 4,
"failed": 0
},
"hits": {
"total": 0,
"max_score": null,
"hits": []
},
"aggregations": {
"demo1": {
"doc_count_error_upper_bound": 0,
"sum_other_doc_count": 0,
"buckets": []
}
}
}
im not able to search uppercase letter why?
in my mapping or setting have any problem
please give me solution .