Combined Facets? Terms + Histogram

Hi,

Devs: Thanks for all the hard work. Elasticsearch is awesome!

Question: I'm still getting to know ElasticSearch, but I'm wondering
if there is a way to combine a histogram facet with a terms facet in a
single result set. For example, I have articles with created_at and
states of ['draft', 'pending_review', 'rejected', 'published',
'etc']. I'm trying return counts of articles per state for each date
for a data visualization. I'd be looking for an output that might look
like this:

[
{
"time": 1307577600000,
[
{
"term": "draft",
"count": 10
},
{
"term": "published",
"count": 3
}
]
},
{
"time": :1307404800000,
[
{
"term": "draft",
"count": 6
},
{
"term": "published",
"count": 13
}
]
}{
...moretimes...
}
]

Is there anyway to fetch this in a single query? I was looking around
the documents and couldn't find a way to implement it. Any help would
be appreciated!

-Mario

Any thoughts or suggestions, any one?

On Sep 26, 12:33 pm, Rio rio...@gmail.com wrote:

Hi,

Devs: Thanks for all the hard work. Elasticsearch is awesome!

Question: I'm still getting to know ElasticSearch, but I'm wondering
if there is a way to combine a histogram facet with a terms facet in a
single result set. For example, I have articles with created_at and
states of ['draft', 'pending_review', 'rejected', 'published',
'etc']. I'm trying return counts of articles per state for each date
for a data visualization. I'd be looking for an output that might look
like this:

[
{
"time": 1307577600000,
[
{
"term": "draft",
"count": 10
},
{
"term": "published",
"count": 3
}
]
},
{
"time": :1307404800000,
[
{
"term": "draft",
"count": 6
},
{
"term": "published",
"count": 13
}
]
}{
...moretimes...
}
]

Is there anyway to fetch this in a single query? I was looking around
the documents and couldn't find a way to implement it. Any help would
be appreciated!

-Mario

No, there isn't a way to do that currently.

On Tue, Sep 27, 2011 at 11:08 PM, Rio rio517@gmail.com wrote:

Any thoughts or suggestions, any one?

On Sep 26, 12:33 pm, Rio rio...@gmail.com wrote:

Hi,

Devs: Thanks for all the hard work. Elasticsearch is awesome!

Question: I'm still getting to know ElasticSearch, but I'm wondering
if there is a way to combine a histogram facet with a terms facet in a
single result set. For example, I have articles with created_at and
states of ['draft', 'pending_review', 'rejected', 'published',
'etc']. I'm trying return counts of articles per state for each date
for a data visualization. I'd be looking for an output that might look
like this:

[
{
"time": 1307577600000,
[
{
"term": "draft",
"count": 10
},
{
"term": "published",
"count": 3
}
]
},
{
"time": :1307404800000,
[
{
"term": "draft",
"count": 6
},
{
"term": "published",
"count": 13
}
]
}{
...moretimes...
}
]

Is there anyway to fetch this in a single query? I was looking around
the documents and couldn't find a way to implement it. Any help would
be appreciated!

-Mario

Cool. Thanks!

Hi,
I am just starting out with elasticsearch and I really like it. Very helpful and rich with features!

I've been using elasticsearch to index events. Similarly I want to query for a count of documents by time. That is, I want to be able to see an average of the number of error events per hour for the last week etc.

Any idea if this sort of feature might be coming up?

Thanks!

This looks like an old post is there a way to do this now?