bug fix when using ES Facet terms, added specs