GET /search/facets throws an 500 internal server error
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Searchlight |
Fix Released
|
High
|
Steve McLellan |
Bug Description
GET /search/facets throws an 500 internal server error.
The api log has this error.
2015-09-25 22:35:10.837 6164 ERROR searchlight.
lakshmiS> sjmc7: with the latest git pull I get an error on GET facets api. do you see that too?
<lakshmiS> ERROR searchlight.
<sjmc7> no, it's been working fine for me and travis
<sjmc7> can you narrow down where the problem is?
<lakshmiS> yeah let me put some log
<lakshmiS> around aggregations query
<lakshmiS> sjmc7: _get_facet_terms() in base.py throws the error. Strangely all that exception says is 'aggregations'
<lakshmiS> i am running it as admin
<sjmc7> shouldn't matter who you're running as. it sounds like the error's coming from elasticsearch
<sjmc7> ah... maybe if the result set is empty
<sjmc7> that might be it. bug time!
<sjmc7> for term, aggregation in six.iteritems(
<sjmc7> try putting a check in
<sjmc7> or dumping out 'results'
<lakshmiS> thats it. aggregations key doesnt exist
<lakshmiS> will file a bug
Changed in searchlight: | |
milestone: | none → liberty-rc1 |
Changed in searchlight: | |
status: | Fix Committed → Fix Released |
Changed in searchlight: | |
milestone: | liberty-rc1 → 0.1.0.0 |
Ok, took me a bit to figure out how to reproduce. But, I found if I deleted everything out of the index (including mappings) that I'd see the error.
2015-09-28 00:38:48.370 ERROR searchlight. api.v1. search [req-50f041b1- 5f9c-4962- a837-fa58c39836 cc f73168afd48e485 1b74d6df1d4131d 0c 195ce78c362e409 ba0d3a40338cccc c2 - - -] 'aggregations'