Not sure I understood your question. If you are trying to combine
statistical and histogram facets in the same facet, it's not possible.
However, you can send multiple facet requests in the same search request:
Not sure I understood your question. If you are trying to combine
statistical and histogram facets in the same facet, it's not possible.
However, you can send multiple facet requests in the same search request:
Your first example looks like statistical facet response, not
date histogram facet response. So, I am not quite sure what information you
are trying to retrieve. What's the type of the field that you are running
these facet queries on? Can you provide a more detailed example of what you
are trying to achieve?
On Monday, April 23, 2012 11:51:26 PM UTC-4, George Viju wrote:
Thank you Igor Motov! In my case, I need to combine the Date
Histogram and Term Facet
It is like.
Daterange and the count of matches similar to
createddate" : {
"_type" : "statistical",
"count" : 158,
"total" : 2.10720682311E14,
"min" : 1.3332708E12,
"max" : 1.3340484E12,
"mean" : 1.3336752045E12,
"sum_of_squares" : 2.8103295903276077E26,
"variance" : 6.30332803714792E16,
"std_deviation" : 2.510642952940127E8
}
Not sure I understood your question. If you are trying to combine
statistical and histogram facets in the same facet, it's not possible.
However, you can send multiple facet requests in the same search
request:
Thank You Igor Motov! . I have the parameters should be be found
like -- createddaterange vs sales and items (in the createddaterange)
vs sales ,
Here I need to find,
For each date range the number(amount) of sales.
For each items in the date range the number(amount) of sales.
Example:
From April 20, 2012 11:51:26 to April 23, 2012 11:51:26 the
number of sales is 25
From April 20, 2012 11:51:26 to April 23, 2012 11:51:26 the
number of sales of item AAA is 30
My Output is Like
From April 20, 2012 11:51:26 to April 23, 2012 11:51:26
the number of sales is 25 and the sales of item AAA is 30.
Your first example looks like statistical facet response, not
date histogram facet response. So, I am not quite sure what information you
are trying to retrieve. What's the type of the field that you are running
these facet queries on? Can you provide a more detailed example of what you
are trying to achieve?
On Monday, April 23, 2012 11:51:26 PM UTC-4, George Viju wrote:
Thank you Igor Motov! In my case, I need to combine the Date
Histogram and Term Facet
It is like.
Daterange and the count of matches similar to
createddate" : {
"_type" : "statistical",
"count" : 158,
"total" : 2.10720682311E14,
"min" : 1.3332708E12,
"max" : 1.3340484E12,
"mean" : 1.3336752045E12,
"sum_of_squares" : 2.8103295903276077E26,
"variance" : 6.30332803714792E16,
"std_deviation" : 2.510642952940127E8
}
Not sure I understood your question. If you are trying to combine
statistical and histogram facets in the same facet, it's not possible.
However, you can send multiple facet requests in the same search
request:
Are you going to have multiple ranges per request or a single range per
request?
On Tuesday, April 24, 2012 11:18:42 AM UTC-4, George Viju wrote:
Thank You Igor Motov! . I have the parameters should be be found
like -- createddaterange vs sales and items (in the createddaterange)
vs sales ,
Here I need to find,
For each date range the number(amount) of sales.
For each items in the date range the number(amount) of sales.
Example:
From April 20, 2012 11:51:26 to April 23, 2012 11:51:26 the
number of sales is 25
From April 20, 2012 11:51:26 to April 23, 2012 11:51:26 the
number of sales of item AAA is 30
My Output is Like
From April 20, 2012 11:51:26 to April 23, 2012 11:51:26
the number of sales is 25 and the sales of item AAA is 30.
Your first example looks like statistical facet response, not
date histogram facet response. So, I am not quite sure what information
you
are trying to retrieve. What's the type of the field that you are
running
these facet queries on? Can you provide a more detailed example of what
you
are trying to achieve?
On Monday, April 23, 2012 11:51:26 PM UTC-4, George Viju wrote:
Thank you Igor Motov! In my case, I need to combine the Date
Histogram and Term Facet
It is like.
Daterange and the count of matches similar to
createddate" : {
"_type" : "statistical",
"count" : 158,
"total" : 2.10720682311E14,
"min" : 1.3332708E12,
"max" : 1.3340484E12,
"mean" : 1.3336752045E12,
"sum_of_squares" : 2.8103295903276077E26,
"variance" : 6.30332803714792E16,
"std_deviation" : 2.510642952940127E8
}
Not sure I understood your question. If you are trying to combine
statistical and histogram facets in the same facet, it's not
possible.
However, you can send multiple facet requests in the same search
request:
Are you going to have multiple ranges per request or a single range per
request?
On Tuesday, April 24, 2012 11:18:42 AM UTC-4, George Viju wrote:
Thank You Igor Motov! . I have the parameters should be be found
like -- createddaterange vs sales and items (in the createddaterange)
vs sales ,
Here I need to find,
For each date range the number(amount) of sales.
For each items in the date range the number(amount) of sales.
Example:
From April 20, 2012 11:51:26 to April 23, 2012 11:51:26 the
number of sales is 25
From April 20, 2012 11:51:26 to April 23, 2012 11:51:26 the
number of sales of item AAA is 30
My Output is Like
From April 20, 2012 11:51:26 to April 23, 2012 11:51:26
the number of sales is 25 and the sales of item AAA is 30.
Your first example looks like statistical facet response, not
date histogram facet response. So, I am not quite sure what information
you
are trying to retrieve. What's the type of the field that you are
running
these facet queries on? Can you provide a more detailed example of what
you
are trying to achieve?
On Monday, April 23, 2012 11:51:26 PM UTC-4, George Viju wrote:
Thank you Igor Motov! In my case, I need to combine the Date
Histogram and Term Facet
It is like.
Daterange and the count of matches similar to
createddate" : {
"_type" : "statistical",
"count" : 158,
"total" : 2.10720682311E14,
"min" : 1.3332708E12,
"max" : 1.3340484E12,
"mean" : 1.3336752045E12,
"sum_of_squares" : 2.8103295903276077E26,
"variance" : 6.30332803714792E16,
"std_deviation" : 2.510642952940127E8
}
Not sure I understood your question. If you are trying to combine
statistical and histogram facets in the same facet, it's not
possible.
However, you can send multiple facet requests in the same search
request:
I think I have started to understand what you are trying to achieve, but I
am still a little bit confused about "sale". In your example, for the same
period of time the total number of sales (25) is smaller than the number of
sales for one item (30). How is this possible and how are sales
represented/stored in your index?
On Tuesday, April 24, 2012 11:56:46 PM UTC-4, George Viju wrote:
Thank You Igor Motov! Here I am using single date range per request.
Are you going to have multiple ranges per request or a single range per
request?
On Tuesday, April 24, 2012 11:18:42 AM UTC-4, George Viju wrote:
Thank You Igor Motov! . I have the parameters should be be found
like -- createddaterange vs sales and items (in the createddaterange)
vs sales ,
Here I need to find,
For each date range the number(amount) of sales.
For each items in the date range the number(amount) of sales.
Example:
From April 20, 2012 11:51:26 to April 23, 2012 11:51:26 the
number of sales is 25
From April 20, 2012 11:51:26 to April 23, 2012 11:51:26 the
number of sales of item AAA is 30
My Output is Like
From April 20, 2012 11:51:26 to April 23, 2012 11:51:26
the number of sales is 25 and the sales of item AAA is 30.
Your first example looks like statistical facet response, not
date histogram facet response. So, I am not quite sure what
information
you
are trying to retrieve. What's the type of the field that you are
running
these facet queries on? Can you provide a more detailed example of
what
you
are trying to achieve?
On Monday, April 23, 2012 11:51:26 PM UTC-4, George Viju wrote:
Thank you Igor Motov! In my case, I need to combine the
Date
Histogram and Term Facet
It is like.
Daterange and the count of matches similar to
createddate" : {
"_type" : "statistical",
"count" : 158,
"total" : 2.10720682311E14,
"min" : 1.3332708E12,
"max" : 1.3340484E12,
"mean" : 1.3336752045E12,
"sum_of_squares" : 2.8103295903276077E26,
"variance" : 6.30332803714792E16,
"std_deviation" : 2.510642952940127E8
}
Not sure I understood your question. If you are trying to
combine
statistical and histogram facets in the same facet, it's not
possible.
However, you can send multiple facet requests in the same search
request:
I think I have started to understand what you are trying to achieve, but I
am still a little bit confused about "sale". In your example, for the same
period of time the total number of sales (25) is smaller than the number of
sales for one item (30). How is this possible and how are sales
represented/stored in your index?
On Tuesday, April 24, 2012 11:56:46 PM UTC-4, George Viju wrote:
Thank You Igor Motov! Here I am using single date range per request.
Are you going to have multiple ranges per request or a single range per
request?
On Tuesday, April 24, 2012 11:18:42 AM UTC-4, George Viju wrote:
Thank You Igor Motov! . I have the parameters should be be found
like -- createddaterange vs sales and items (in the createddaterange)
vs sales ,
Here I need to find,
For each date range the number(amount) of sales.
For each items in the date range the number(amount) of sales.
Example:
From April 20, 2012 11:51:26 to April 23, 2012 11:51:26 the
number of sales is 25
From April 20, 2012 11:51:26 to April 23, 2012 11:51:26 the
number of sales of item AAA is 30
My Output is Like
From April 20, 2012 11:51:26 to April 23, 2012 11:51:26
the number of sales is 25 and the sales of item AAA is 30.
Your first example looks like statistical facet response, not
date histogram facet response. So, I am not quite sure what
information
you
are trying to retrieve. What's the type of the field that you are
running
these facet queries on? Can you provide a more detailed example of
what
you
are trying to achieve?
On Monday, April 23, 2012 11:51:26 PM UTC-4, George Viju wrote:
Thank you Igor Motov! In my case, I need to combine the
Date
Histogram and Term Facet
It is like.
Daterange and the count of matches similar to
createddate" : {
"_type" : "statistical",
"count" : 158,
"total" : 2.10720682311E14,
"min" : 1.3332708E12,
"max" : 1.3340484E12,
"mean" : 1.3336752045E12,
"sum_of_squares" : 2.8103295903276077E26,
"variance" : 6.30332803714792E16,
"std_deviation" : 2.510642952940127E8
}
Not sure I understood your question. If you are trying to
combine
statistical and histogram facets in the same facet, it's not
possible.
However, you can send multiple facet requests in the same search
request:
In this case, all you need to do is to run terms facet with query that
limits results to your date range. The facets will contain number of sales
per term, and the total number of sales will be equal to total number of
hits.
{
.....
"hits" : {
"total" : 7, <--- This is total number of records*
"max_score" : 1.0,
"hits" :
},
"facets" : {
"term" : {
"_type" : "terms",
"missing" : 0,
"total" : 7, <-- This is total number of terms, it will be equal to
the number above if you have one term per record
"other" : 0,
"terms" : [ {
"term" : "AAA",
"count" : 6
}, {
"term" : "BBB",
"count" : 1
} ]
}
}
}
On Wednesday, April 25, 2012 4:58:34 AM UTC-4, George Viju wrote:
I am sorry Igor Motov. Thanks for notifying this. Please read the
Example as:
From April 20, 2012 11:51:26 to April 23, 2012 11:51:26 the
number of sales is 30
From April 20, 2012 11:51:26 to April 23, 2012 11:51:26 the
number of sales of item AAA is 25
My Output is Like
From April 20, 2012 11:51:26 to April 23, 2012 11:51:26
the number of sales is 30 and the sales of item AAA is 25.
I think I have started to understand what you are trying to achieve, but
I
am still a little bit confused about "sale". In your example, for the
same
period of time the total number of sales (25) is smaller than the number
of
sales for one item (30). How is this possible and how are sales
represented/stored in your index?
On Tuesday, April 24, 2012 11:56:46 PM UTC-4, George Viju wrote:
Thank You Igor Motov! Here I am using single date range per request.
Are you going to have multiple ranges per request or a single range
per
request?
On Tuesday, April 24, 2012 11:18:42 AM UTC-4, George Viju wrote:
Thank You Igor Motov! . I have the parameters should be be found
like -- createddaterange vs sales and items (in the
createddaterange)
vs sales ,
Here I need to find,
For each date range the number(amount) of sales.
For each items in the date range the number(amount) of sales.
Example:
From April 20, 2012 11:51:26 to April 23, 2012 11:51:26
the
number of sales is 25
From April 20, 2012 11:51:26 to April 23, 2012 11:51:26
the
number of sales of item AAA is 30
My Output is Like
From April 20, 2012 11:51:26 to April 23, 2012
11:51:26
the number of sales is 25 and the sales of item AAA is 30.
Your first example looks like statistical facet response, not
date histogram facet response. So, I am not quite sure what
information
you
are trying to retrieve. What's the type of the field that you
are
running
these facet queries on? Can you provide a more detailed example
of
what
you
are trying to achieve?
On Monday, April 23, 2012 11:51:26 PM UTC-4, George Viju wrote:
Thank you Igor Motov! In my case, I need to combine the
Date
Histogram and Term Facet
It is like.
Daterange and the count of matches similar to
createddate" : {
"_type" : "statistical",
"count" : 158,
"total" : 2.10720682311E14,
"min" : 1.3332708E12,
"max" : 1.3340484E12,
"mean" : 1.3336752045E12,
"sum_of_squares" : 2.8103295903276077E26,
"variance" : 6.30332803714792E16,
"std_deviation" : 2.510642952940127E8
}
Not sure I understood your question. If you are trying to
combine
statistical and histogram facets in the same facet, it's not
possible.
However, you can send multiple facet requests in the same
search
request:
In this case, all you need to do is to run terms facet with query that
limits results to your date range. The facets will contain number of sales
per term, and the total number of sales will be equal to total number of
hits.
{
.....
"hits" : {
"total" : 7, <--- This is total number of records*
"max_score" : 1.0,
"hits" :
},
"facets" : {
"term" : {
"_type" : "terms",
"missing" : 0,
"total" : 7, <-- This is total number of terms, it will be equal to
the number above if you have one term per record
"other" : 0,
"terms" : [ {
"term" : "AAA",
"count" : 6
}, {
"term" : "BBB",
"count" : 1
} ]
}
}
}
On Wednesday, April 25, 2012 4:58:34 AM UTC-4, George Viju wrote:
I am sorry Igor Motov. Thanks for notifying this. Please read the
Example as:
From April 20, 2012 11:51:26 to April 23, 2012 11:51:26 the
number of sales is 30
From April 20, 2012 11:51:26 to April 23, 2012 11:51:26 the
number of sales of item AAA is 25
My Output is Like
From April 20, 2012 11:51:26 to April 23, 2012 11:51:26
the number of sales is 30 and the sales of item AAA is 25.
I think I have started to understand what you are trying to achieve, but
I
am still a little bit confused about "sale". In your example, for the
same
period of time the total number of sales (25) is smaller than the number
of
sales for one item (30). How is this possible and how are sales
represented/stored in your index?
On Tuesday, April 24, 2012 11:56:46 PM UTC-4, George Viju wrote:
Thank You Igor Motov! Here I am using single date range per request.
Are you going to have multiple ranges per request or a single range
per
request?
On Tuesday, April 24, 2012 11:18:42 AM UTC-4, George Viju wrote:
Thank You Igor Motov! . I have the parameters should be be found
like -- createddaterange vs sales and items (in the
createddaterange)
vs sales ,
Here I need to find,
For each date range the number(amount) of sales.
For each items in the date range the number(amount) of sales.
Example:
From April 20, 2012 11:51:26 to April 23, 2012 11:51:26
the
number of sales is 25
From April 20, 2012 11:51:26 to April 23, 2012 11:51:26
the
number of sales of item AAA is 30
My Output is Like
From April 20, 2012 11:51:26 to April 23, 2012
11:51:26
the number of sales is 25 and the sales of item AAA is 30.
Your first example looks like statistical facet response, not
date histogram facet response. So, I am not quite sure what
information
you
are trying to retrieve. What's the type of the field that you
are
running
these facet queries on? Can you provide a more detailed example
of
what
you
are trying to achieve?
On Monday, April 23, 2012 11:51:26 PM UTC-4, George Viju wrote:
Thank you Igor Motov! In my case, I need to combine the
Date
Histogram and Term Facet
It is like.
Daterange and the count of matches similar to
createddate" : {
"_type" : "statistical",
"count" : 158,
"total" : 2.10720682311E14,
"min" : 1.3332708E12,
"max" : 1.3340484E12,
"mean" : 1.3336752045E12,
"sum_of_squares" : 2.8103295903276077E26,
"variance" : 6.30332803714792E16,
"std_deviation" : 2.510642952940127E8
}
Not sure I understood your question. If you are trying to
combine
statistical and histogram facets in the same facet, it's not
possible.
However, you can send multiple facet requests in the same
search
request:
In this case, all you need to do is to run terms facet with query that
limits results to your date range. The facets will contain number of
sales
per term, and the total number of sales will be equal to total number of
hits.
{
.....
"hits" : {
"total" : 7, <--- This is total number of records*
"max_score" : 1.0,
"hits" :
},
"facets" : {
"term" : {
"_type" : "terms",
"missing" : 0,
"total" : 7, <-- This is total number of terms, it will be equal
to
the number above if you have one term per record
"other" : 0,
"terms" : [ {
"term" : "AAA",
"count" : 6
}, {
"term" : "BBB",
"count" : 1
} ]
}
}
}
On Wednesday, April 25, 2012 4:58:34 AM UTC-4, George Viju wrote:
I am sorry Igor Motov. Thanks for notifying this. Please read the
Example as:
From April 20, 2012 11:51:26 to April 23, 2012 11:51:26 the
number of sales is 30
From April 20, 2012 11:51:26 to April 23, 2012 11:51:26 the
number of sales of item AAA is 25
My Output is Like
From April 20, 2012 11:51:26 to April 23, 2012 11:51:26
the number of sales is 30 and the sales of item AAA is 25.
I think I have started to understand what you are trying to achieve,
but
I
am still a little bit confused about "sale". In your example, for
the
same
period of time the total number of sales (25) is smaller than the
number
of
sales for one item (30). How is this possible and how are sales
represented/stored in your index?
On Tuesday, April 24, 2012 11:56:46 PM UTC-4, George Viju wrote:
Thank You Igor Motov! Here I am using single date range per
request.
Are you going to have multiple ranges per request or a single
range
per
request?
On Tuesday, April 24, 2012 11:18:42 AM UTC-4, George Viju wrote:
Thank You Igor Motov! . I have the parameters should be be
found
like -- createddaterange vs sales and items (in the
createddaterange)
vs sales ,
Here I need to find,
For each date range the number(amount) of sales.
For each items in the date range the number(amount) of
sales.
Example:
From April 20, 2012 11:51:26 to April 23, 2012 11:51:26
the
number of sales is 25
From April 20, 2012 11:51:26 to April 23, 2012 11:51:26
the
number of sales of item AAA is 30
My Output is Like
From April 20, 2012 11:51:26 to April 23, 2012
11:51:26
the number of sales is 25 and the sales of item AAA is 30.
Your first example looks like statistical facet response,
not
date histogram facet response. So, I am not quite sure what
information
you
are trying to retrieve. What's the type of the field that
you
are
running
these facet queries on? Can you provide a more detailed
example
of
what
you
are trying to achieve?
On Monday, April 23, 2012 11:51:26 PM UTC-4, George Viju
wrote:
Thank you Igor Motov! In my case, I need to combine
the
Date
Histogram and Term Facet
It is like.
Daterange and the count of matches similar to
createddate" : {
"_type" : "statistical",
"count" : 158,
"total" : 2.10720682311E14,
"min" : 1.3332708E12,
"max" : 1.3340484E12,
"mean" : 1.3336752045E12,
"sum_of_squares" : 2.8103295903276077E26,
"variance" : 6.30332803714792E16,
"std_deviation" : 2.510642952940127E8
}
Not sure I understood your question. If you are trying
to
combine
statistical and histogram facets in the same facet, it's
not
possible.
However, you can send multiple facet requests in the
same
search
request:
In this case, all you need to do is to run terms facet with query that
limits results to your date range. The facets will contain number of
sales
per term, and the total number of sales will be equal to total number of
hits.
{
.....
"hits" : {
"total" : 7, <--- This is total number of records*
"max_score" : 1.0,
"hits" :
},
"facets" : {
"term" : {
"_type" : "terms",
"missing" : 0,
"total" : 7, <-- This is total number of terms, it will be equal
to
the number above if you have one term per record
"other" : 0,
"terms" : [ {
"term" : "AAA",
"count" : 6
}, {
"term" : "BBB",
"count" : 1
} ]
}
}
}
On Wednesday, April 25, 2012 4:58:34 AM UTC-4, George Viju wrote:
I am sorry Igor Motov. Thanks for notifying this. Please read the
Example as:
From April 20, 2012 11:51:26 to April 23, 2012 11:51:26 the
number of sales is 30
From April 20, 2012 11:51:26 to April 23, 2012 11:51:26 the
number of sales of item AAA is 25
My Output is Like
From April 20, 2012 11:51:26 to April 23, 2012 11:51:26
the number of sales is 30 and the sales of item AAA is 25.
I think I have started to understand what you are trying to achieve,
but
I
am still a little bit confused about "sale". In your example, for
the
same
period of time the total number of sales (25) is smaller than the
number
of
sales for one item (30). How is this possible and how are sales
represented/stored in your index?
On Tuesday, April 24, 2012 11:56:46 PM UTC-4, George Viju wrote:
Thank You Igor Motov! Here I am using single date range per
request.
Are you going to have multiple ranges per request or a single
range
per
request?
On Tuesday, April 24, 2012 11:18:42 AM UTC-4, George Viju wrote:
Thank You Igor Motov! . I have the parameters should be be
found
like -- createddaterange vs sales and items (in the
createddaterange)
vs sales ,
Here I need to find,
For each date range the number(amount) of sales.
For each items in the date range the number(amount) of
sales.
Example:
From April 20, 2012 11:51:26 to April 23, 2012 11:51:26
the
number of sales is 25
From April 20, 2012 11:51:26 to April 23, 2012 11:51:26
the
number of sales of item AAA is 30
My Output is Like
From April 20, 2012 11:51:26 to April 23, 2012
11:51:26
the number of sales is 25 and the sales of item AAA is 30.
Your first example looks like statistical facet response,
not
date histogram facet response. So, I am not quite sure what
information
you
are trying to retrieve. What's the type of the field that
you
are
running
these facet queries on? Can you provide a more detailed
example
of
what
you
are trying to achieve?
On Monday, April 23, 2012 11:51:26 PM UTC-4, George Viju
wrote:
Thank you Igor Motov! In my case, I need to combine
the
Date
Histogram and Term Facet
It is like.
Daterange and the count of matches similar to
createddate" : {
"_type" : "statistical",
"count" : 158,
"total" : 2.10720682311E14,
"min" : 1.3332708E12,
"max" : 1.3340484E12,
"mean" : 1.3336752045E12,
"sum_of_squares" : 2.8103295903276077E26,
"variance" : 6.30332803714792E16,
"std_deviation" : 2.510642952940127E8
}
Not sure I understood your question. If you are trying
to
combine
statistical and histogram facets in the same facet, it's
not
possible.
However, you can send multiple facet requests in the
same
search
request:
You can have multiple term facets, under their own name, each with a
facet_filter that further filter down the relevant term facet on a specific
date range.
In this case, all you need to do is to run terms facet with query that
limits results to your date range. The facets will contain number of
sales
per term, and the total number of sales will be equal to total number of
hits.
{
.....
"hits" : {
"total" : 7, <--- This is total number of records*
"max_score" : 1.0,
"hits" :
},
"facets" : {
"term" : {
"_type" : "terms",
"missing" : 0,
"total" : 7, <-- This is total number of terms, it will be equal
to
the number above if you have one term per record
"other" : 0,
"terms" : [ {
"term" : "AAA",
"count" : 6
}, {
"term" : "BBB",
"count" : 1
} ]
}
}
}
On Wednesday, April 25, 2012 4:58:34 AM UTC-4, George Viju wrote:
I am sorry Igor Motov. Thanks for notifying this. Please read the
Example as:
From April 20, 2012 11:51:26 to April 23, 2012 11:51:26 the
number of sales is 30
From April 20, 2012 11:51:26 to April 23, 2012 11:51:26 the
number of sales of item AAA is 25
My Output is Like
From April 20, 2012 11:51:26 to April 23, 2012 11:51:26
the number of sales is 30 and the sales of item AAA is 25.
I think I have started to understand what you are trying to achieve,
but
I
am still a little bit confused about "sale". In your example, for the
same
period of time the total number of sales (25) is smaller than the
number
of
sales for one item (30). How is this possible and how are sales
represented/stored in your index?
On Tuesday, April 24, 2012 11:56:46 PM UTC-4, George Viju wrote:
Thank You Igor Motov! Here I am using single date range per
request.
Are you going to have multiple ranges per request or a single
range
per
request?
On Tuesday, April 24, 2012 11:18:42 AM UTC-4, George Viju wrote:
Thank You Igor Motov! . I have the parameters should be be
found
like -- createddaterange vs sales and items (in the
createddaterange)
vs sales ,
Here I need to find,
For each date range the number(amount) of sales.
For each items in the date range the number(amount) of
sales.
Example:
From April 20, 2012 11:51:26 to April 23, 2012 11:51:26
the
number of sales is 25
From April 20, 2012 11:51:26 to April 23, 2012 11:51:26
the
number of sales of item AAA is 30
My Output is Like
From April 20, 2012 11:51:26 to April 23, 2012
11:51:26
the number of sales is 25 and the sales of item AAA is 30.
Your first example looks like statistical facet response, not
date histogram facet response. So, I am not quite sure what
information
you
are trying to retrieve. What's the type of the field that you
are
running
these facet queries on? Can you provide a more detailed
example
of
what
you
are trying to achieve?
On Monday, April 23, 2012 11:51:26 PM UTC-4, George Viju
wrote:
Thank you Igor Motov! In my case, I need to combine
the
Date
Histogram and Term Facet
It is like.
Daterange and the count of matches similar to
createddate" : {
"_type" : "statistical",
"count" : 158,
"total" : 2.10720682311E14,
"min" : 1.3332708E12,
"max" : 1.3340484E12,
"mean" : 1.3336752045E12,
"sum_of_squares" : 2.8103295903276077E26,
"variance" : 6.30332803714792E16,
"std_deviation" : 2.510642952940127E8
}
Not sure I understood your question. If you are trying to
combine
statistical and histogram facets in the same facet, it's
not
possible.
However, you can send multiple facet requests in the same
search
request:
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.