Created
November 10, 2011 12:37
-
-
Save benzheren/1354764 to your computer and use it in GitHub Desktop.
Tire Search Code using DSL
This file contains hidden or 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
@s = Tire.search index_path, | |
:from => 0, | |
:size => 100, | |
:query => {"text" => {"_all" => query}}, | |
:highlight => {"fields" => {"text" => {}}, | |
"pre_tags" => ["<strong class=\"highlight\">"], | |
"post_tags" => ["</strong>"]} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment