Getting the Facets for the Entire Response

Hi all,
How can I get the facets of the whole response?

For Example

searchRequestBuilder.addFacet(FacetBuilders.termsFacet("namecount").field("name.namesort").size(10));

response = searchRequestBuilder.execute().actionGet();

Here am getting the facets for the first 10 data in the response. How
can I get the facets for the all data in the whole response.

Cheers!!

George

By default, facets are computed on the whole response.

I suggest to remove the .size(10).

HTH

Le 14 mars 2012 à 14:03, George Viju vijuitech@gmail.com a écrit :

Hi all,
How can I get the facets of the whole response?

For Example

searchRequestBuilder.addFacet(FacetBuilders.termsFacet("namecount").field("name.namesort").size(10));

response = searchRequestBuilder.execute().actionGet();

Here am getting the facets for the first 10 data in the response. How
can I get the facets for the all data in the whole response.

Cheers!!

George

--
David Pilato
http://dev.david.pilato.fr/
Twitter : @dadoonet

Thanks...I used the code by removing the size and it is taking
default as 10 facets..Here is my code

searchRequestBuilder.addFacet(FacetBuilders.termsFacet("namecount").field("
name.namesort"));
response = searchRequestBuilder.execute().actionGet();

How can I get all facets of the whole response?

Cheers!!

George

On Mar 14, 7:15 pm, "da...@pilato.fr" da...@pilato.fr wrote:

By default, facets are computed on the whole response.

I suggest to remove the .size(10).

HTH

Le 14 mars 2012 à 14:03, George Viju vijuit...@gmail.com a écrit :

Hi all,
How can I get the facets of the whole response?

For Example

searchRequestBuilder.addFacet(FacetBuilders.termsFacet("namecount").field(" name.namesort").size(10));

response = searchRequestBuilder.execute().actionGet();

Here am getting the facets for the first 10 data in the response. How
can I get the facets for the all data in the whole response.

Cheers!!

George

--
David Pilatohttp://dev.david.pilato.fr/
Twitter : @dadoonet

Ok. I didn't understand the first post.
I think you are looking for this :

David :wink:
@dadoonet

Le 15 mars 2012 à 06:02, George Viju vijuitech@gmail.com a écrit :

Thanks...I used the code by removing the size and it is taking
default as 10 facets..Here is my code

searchRequestBuilder.addFacet(FacetBuilders.termsFacet("namecount").field("
name.namesort"));
response = searchRequestBuilder.execute().actionGet();

How can I get all facets of the whole response?

Cheers!!

George

On Mar 14, 7:15 pm, "da...@pilato.fr" da...@pilato.fr wrote:

By default, facets are computed on the whole response.

I suggest to remove the .size(10).

HTH

Le 14 mars 2012 à 14:03, George Viju vijuit...@gmail.com a écrit :

Hi all,
How can I get the facets of the whole response?

For Example

searchRequestBuilder.addFacet(FacetBuilders.termsFacet("namecount").field(" name.namesort").size(10));

response = searchRequestBuilder.execute().actionGet();

Here am getting the facets for the first 10 data in the response. How
can I get the facets for the all data in the whole response.

Cheers!!

George

--
David Pilatohttp://dev.david.pilato.fr/
Twitter : @dadoonet

Thanks so much David!

Cheers

George

On Mar 15, 10:35 am, David Pilato da...@pilato.fr wrote:

Ok. I didn't understand the first post.
I think you are looking for this :Support "size": 0 for Term Facet · Issue #1776 · elastic/elasticsearch · GitHub

David :wink:
@dadoonet

Le 15 mars 2012 à 06:02, George Viju vijuit...@gmail.com a écrit :

Thanks...I used the code by removing the size and it is taking
default as 10facets..Here is my code

searchRequestBuilder.addFacet(FacetBuilders.termsFacet("namecount").field("
name.namesort"));
response= searchRequestBuilder.execute().actionGet();

How can I get allfacetsof the wholeresponse?

Cheers!!

George

On Mar 14, 7:15 pm, "da...@pilato.fr" da...@pilato.fr wrote:

By default,facetsare computed on the wholeresponse.

I suggest to remove the .size(10).

HTH

Le 14 mars 2012 à 14:03, George Viju vijuit...@gmail.com a écrit :

Hi all,
How can I get thefacetsof the wholeresponse?

For Example

searchRequestBuilder.addFacet(FacetBuilders.termsFacet("namecount").field(" name.namesort").size(10));

response= searchRequestBuilder.execute().actionGet();

Here amgettingthefacetsfor the first 10 data in theresponse. How
can I get thefacetsfor the all data in the wholeresponse.

Cheers!!

George

--
David Pilatohttp://dev.david.pilato.fr/
Twitter : @dadoonet