mirror of https://github.com/apache/lucene.git
Add helper method to retrieve and sort facets
git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@499438 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f294acbcd7
commit
1bebd85d26
|
@ -36,6 +36,11 @@ module Solr
|
|||
def max_score
|
||||
return @response['maxScore']
|
||||
end
|
||||
|
||||
def field_facets(field)
|
||||
@data['facet_counts']['facet_fields'][field].sort {|a,b| b[1] <=> a[1]}
|
||||
end
|
||||
|
||||
|
||||
# supports enumeration of hits
|
||||
def each
|
||||
|
|
Loading…
Reference in New Issue