I do the following query curl -XPOST
"http://localhost:9200/_search?pretty=true" -d '
{
"query" : { "match_all" : {} },
"facets" : {
"tags" : { "terms" : { "field" : "port"} }
}
}
'
It gives me back results, but it doesn't read the field correctly. It is
breaking it into parts. Sample output snippet.
{
"took" : 184,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 5,
"failed" : 0
},
"hits" : {
"total" : 79033,
"max_score" : 1.0,
"hits" : [ {
"_index" : "logstash-2013.12.14",
"_type" : "fluentd",
"_id" : "L3zraX4jQFurtthZmJz1gA",
"_score" : 1.0, "_source" : {"hostname":"Opus-1","latency":817,
"port":"xe-0/0/4:1","queue depth":1021904,"record
type":"queue-stats","time":"Dec 13
19:47:26.587","_jnpr":"analyticsD.jnpr","@timestamp":"2013-12-13T19:47:26-08:00"}
}, {
"_index" : "logstash-2013.12.14",
"_type" : "fluentd",
"_id" : "kccm8UWaTXaUwxEuxn1Mbw",
"_score" : 1.0, "_source" : {"hostname":"Opus-1","latency":817,
"port":"xe-0/0/4:1","queue depth":1021904,"record
type":"queue-stats","time":"Dec 13
19:47:26.598","_jnpr":"analyticsD.jnpr","@timestamp":"2013-12-13T19:47:26-08:00"}
},]
},
"facets" : {
"tags" : {
"_type" : "terms",
"missing" : 0,
"total" : 316132,
"other" : 0,
"terms" : [ {
"term" : "xe",
"count" : 79033
}, {
"term" : "4",
"count" : 79033
}, {
"term" : "1",
"count" : 79033
}, {
"term" : "0",
"count" : 79033
} ]
}
}
}
as you can see the field port contains "xe-0/0/4:1", but the facets is
breaking it apart into subterms. I want it read as a single term
"xe-0/0/4:1". How do I do this?
Thank you
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/270bb8ce-c4c3-434c-9686-9bbf0a19b86c%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.