土豆片(http://www.tudoupian.com)开发采用更加灵活的solr搜索服务器来实现分层功能。
1.QueryResponse类:
_facetFields:所有的分层结果 使用 getFacetField(String name) 获得结果
_limitingFacets:facetFields中个数大于0的分层,使用getLimitingFacets()返回所有Count个数大于0的FacetField。
_facetDates:根据日期的分层结果 getFacetDate(String name)
例外,要使用Facet功能,除了设置 Field外,还需要将facet属性设置为true,默认是false的。