karmi / retire

A rich Ruby API and DSL for the Elasticsearch search engine
http://karmi.github.com/retire/
MIT License
1.86k stars 533 forks source link

Facet sizing crash #949

Closed craigsheen closed 10 years ago

craigsheen commented 10 years ago

I am returning a number of facets from my search but I want/need it to return more than the default 10.

If I change this to be;

s.facet('brands') { terms :brand_id, size: 100 }

This fixes the issue. However when I then use the facets to filter the search down, if the search does not return any results that have that facet (i.e. brand) and I have the size specified I get an error;

!! Invalid request

Any ideas how to solve this?

craigsheen commented 10 years ago

Ah sorry this is not actually an issue with tire.

I was passing the facets in the url as I needed to show them again but filter down on them, When I had large sizes the uri request was becoming too large and causing it to crash.

karmi commented 10 years ago

Ah, great. Was wondering what was causing it :)