Created
March 11, 2010 17:36
-
-
Save DimaD/329402 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sunspot.search(Person) do | |
keywords(query_string) do | |
boost_fields query_boost_fields | |
highlight(*fields_to_highlight.push(:fragment_size => default_highlight_fragment_size)) | |
end | |
facet(:class) | |
# | |
# Very ugly hack to allow facets for all data types | |
# | |
adjust_solr_params do |params| | |
params[:fq] = ["{!tag=type_filter}type:Person"] | |
params[:"facet.field"] = ["{!ex=type_filter}class_name"] | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment