apply code review changes for getFacet method in search server