Displaying 1 result from an estimated 1 matches for "headline_highlight".
2007 Sep 05
1
AAF and DRb with highlighting
...the core search function from Ferret, which
Acts_as_ferret hides
total_hits = index.search_each(query, options) do |hit, score|
doc = index[hit]
result = {}
article = Article.find(doc[:id])
# Store each field in a hash which we can reference in our views
result[:headline_highlight] = index.highlight(query, hit,
:field => :headline,
:pre_tag => "<strong>",
:post_tag => "</strong>",
:num_excerpts => 1)
result[:body_highlight] = index.highlight(query, hit,
:field => :body,
:pre_...