Facets are missing - only 10

Hi,

i try to make some facets here, but some are missing - elasticsearch
always return 10 facets in random order:

{
"query" : { "match_all" : { } }

  ,

"facets" : {
  "uhren-facetten" : { "terms" : {"fields" : ["Hersteller" ,

"Ziffernblattfarbe" , "Anzeige" , "Uhrwerk" , "Armbandfarbe" ,
"Funktionen" , "Armbandmaterial" ] } , "all_terms" : true } }
}

}

There should be over 30 facets, but it always returns 10. I tried less
terms and always two terms and then the correct facets are showing.
But never more than ten :wink:

I use this for the output right now:

$response = json_decode($jason_output, true);

$output = '' ;

$output.= print_r($response['hits']['hits']);

$output.= print_r($response['facets']);

On a side note: Will i have performance issues if i always run against
all elements as long as there are less than ~5k objects ?

thx a lot in advance !

By Default Elasticsearch gives 10 results.
You can put size with facet search.

Regards,
Pulkit Agrawall

On Tue, Dec 27, 2011 at 10:31 AM, mrblue
john.agricola.27@googlemail.com wrote:

Hi,

i try to make some facets here, but some are missing - elasticsearch
always return 10 facets in random order:

{
"query" : { "match_all" : { } }

     ,

   "facets" : {
 "uhren-facetten" : { "terms" : {"fields" : ["Hersteller" ,

"Ziffernblattfarbe" , "Anzeige" , "Uhrwerk" , "Armbandfarbe" ,
"Funktionen" , "Armbandmaterial" ] } , "all_terms" : true } }
}

}

There should be over 30 facets, but it always returns 10. I tried less
terms and always two terms and then the correct facets are showing.
But never more than ten :wink:

I use this for the output right now:

$response = json_decode($jason_output, true);

$output = '' ;

$output.= print_r($response['hits']['hits']);

$output.= print_r($response['facets']);

On a side note: Will i have performance issues if i always run against
all elements as long as there are less than ~5k objects ?

thx a lot in advance !

This was it, thx. Had to figure out where to put it.. if anyone
wonders:

{
"query" : { "match_all" : { } }

  ,

"facets" : {
  "uhren-facetten" : { "terms" : {"fields" : ["Hersteller" ,

"Ziffernblattfarbe" , "Anzeige" , "Uhrwerk" , "Armbandfarbe" ,
"Funktionen" , "Armbandmaterial" ], "size" : "20" } , "all_terms" :
true } }
}

}

On Dec 27, 6:28 am, Pulkit Agrawal pulkitdot...@gmail.com wrote:

By Default Elasticsearch gives 10 results.
You can put size with facet search.

Regards,
Pulkit Agrawall

On Tue, Dec 27, 2011 at 10:31 AM, mrblue

john.agricola...@googlemail.com wrote:

Hi,

i try to make some facets here, but some are missing - elasticsearch
always return 10 facets in random order:

{
"query" : { "match_all" : { } }

     ,
   "facets" : {
 "uhren-facetten" : { "terms" : {"fields" : ["Hersteller" ,

"Ziffernblattfarbe" , "Anzeige" , "Uhrwerk" , "Armbandfarbe" ,
"Funktionen" , "Armbandmaterial" ] } , "all_terms" : true } }
}

}

There should be over 30 facets, but it always returns 10. I tried less
terms and always two terms and then the correct facets are showing.
But never more than ten :wink:

I use this for the output right now:

$response = json_decode($jason_output, true);

$output = '' ;

$output.= print_r($response['hits']['hits']);

$output.= print_r($response['facets']);

On a side note: Will i have performance issues if i always run against
all elements as long as there are less than ~5k objects ?

thx a lot in advance !

try this

{
"query" : { "match_all" : { } }

     ,

   "facets" : {
 "uhren-facetten" : { "terms" : {"fields" : ["Hersteller" ,

"Ziffernblattfarbe" , "Anzeige" , "Uhrwerk" , "Armbandfarbe" ,
"Funktionen" , "Armbandmaterial" ], "size" : 20 } , "all_terms" :
true } }

i.e without quotes around 20

On Tue, Dec 27, 2011 at 11:20 AM, mrblue
john.agricola.27@googlemail.com wrote:

This was it, thx. Had to figure out where to put it.. if anyone
wonders:

{
"query" : { "match_all" : { } }

     ,

   "facets" : {
 "uhren-facetten" : { "terms" : {"fields" : ["Hersteller" ,

"Ziffernblattfarbe" , "Anzeige" , "Uhrwerk" , "Armbandfarbe" ,
"Funktionen" , "Armbandmaterial" ], "size" : "20" } , "all_terms" :
true } }
}

}

On Dec 27, 6:28 am, Pulkit Agrawal pulkitdot...@gmail.com wrote:

By Default Elasticsearch gives 10 results.
You can put size with facet search.

Regards,
Pulkit Agrawall

On Tue, Dec 27, 2011 at 10:31 AM, mrblue

john.agricola...@googlemail.com wrote:

Hi,

i try to make some facets here, but some are missing - elasticsearch
always return 10 facets in random order:

{
"query" : { "match_all" : { } }

     ,
   "facets" : {
 "uhren-facetten" : { "terms" : {"fields" : ["Hersteller" ,

"Ziffernblattfarbe" , "Anzeige" , "Uhrwerk" , "Armbandfarbe" ,
"Funktionen" , "Armbandmaterial" ] } , "all_terms" : true } }
}

}

There should be over 30 facets, but it always returns 10. I tried less
terms and always two terms and then the correct facets are showing.
But never more than ten :wink:

I use this for the output right now:

$response = json_decode($jason_output, true);

$output = '' ;

$output.= print_r($response['hits']['hits']);

$output.= print_r($response['facets']);

On a side note: Will i have performance issues if i always run against
all elements as long as there are less than ~5k objects ?

thx a lot in advance !