I encountered a problem, as I need to sort my buckets using a keyword field for this I have tried two approaches.