ElasticSearch Newbee so kindly consider stupid questions ;)
lets say I have the following document structure
{
"@timestamp": DDMMYYHHMMSS,
"title": "some test here",
"views": 4
}
and my mapping is
mappings: {
- -
_default_: {
- -
_all: {
- enabled: false
}
}
- -
mytype: {
- dynamic: "strict"
- -
_all: {
- enabled: false
}
- -
properties: {
- -
@timestamp: {
- type: "date"
- format: "dateOptionalTime"
}
- -
*title*: {
- type: "string"
}
- -
- -
views: {
- type: "integer"
- index: "no"
}
}
}
}
so basically I don't want to index my views field as I don't want to search
by views, but I want to get stats for this field or get a date histogram,
for example a histogram of the total views over a given time per hour or
per day
my query looks like this
{
"facets": {
"0": {
"date_histogram": {
"key_field": "@timestamp",
"value_field": "views",
"interval": "1y"
},
"global": true,
"facet_filter": {
"fquery": {
"query": {
"filtered": {
"query": {
"query_string": {
"query": "*"
}
},
"filter": {
"bool": {
"must": [
{
"match_all": {}
}
]
}
}
}
}
}
}
}
},
"size": 0
}
this returns
facets: {
- -
0: {
- _type: "date_histogram"
- -
entries: [
- -
{
- time: 1356998400000
- count: 27339
- min: "Infinity"
- max: "-Infinity"
- total: 0
- total_count: 0
- mean: 0
}
]
}
}
so my question is can I do facet/aggregation querries on fields that are
not indexed ? and if not why not ? isn't indexing supposed to be only for
searching ?
Thanks
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/75539648-c132-4e70-bb72-bb49c6c4e7db%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.