search for: excerpt_length

Displaying 7 results from an estimated 7 matches for "excerpt_length".

2007 Aug 08
2
Highlighting broken in TRUNK
Hello list, As there is still some large file support bugs in the 0.11.4 release I had to download the trunk and apply a patch sent in by kyle http:// ferret.davebalmain.com/trac/ticket/215. The problem is now that the highlighting doesn''t work. Somehow it combines excerpt_length with num_excerpts so if you have and excerpt_length of 50 and num_excerpts of 5 and you get only one hit when searching the excerpts is either the whole text or 50*5 = 250. So everytime you get a result with less hits than num_excerpts the highlighting goes crazy. Comments, Fixes, Patches...
2007 Jun 19
3
another issue with highlighting
...do |id,score| for b in [:un, :deux, :trois, :quatre, :cinq, :six, :sept, :huit, :neuf, :dix] z[b]=[] if not z[b] z[b] << id.to_s + " : " + index.highlight(q,id,:field => b, :pre_tag => "<em>", :post_tag => "</em>", :num_excerpts => :all, :excerpt_length => :all).join(" | ") if index[id][b].match(/1/) and index.highlight(q,id,:field => b, :pre_tag => "<em>", :post_tag => "</em>", :num_excerpts => :all, :excerpt_length => :all) and not index.highlight(q,id,:field => b, :pre_tag => &qu...
2007 Feb 06
2
Which method to use to get content from index with a_a_f?
...onsider the following controller action: def preview if params[:search].blank? # normal case @text = @myfile. # which method do I use here to get the :text from the index??? else # if we come from the search results page @text = @myfile.highlight(params[:search], { :field => :text, :excerpt_length => :all, :pre_tag => ''[highlight]'', :post_tag => ''[/highlight]'' }) end end I didn''t store my text in the database, only in the index. When I''m coming from a search I use the highlight method, so the term I searched for gets highlight...
2007 Jun 28
1
DRb server crashing
...:243 /usr/local/bin/mongrel_rails:16:in `load'' /usr/local/bin/mongrel_rails:16 ----------- ferret_server.out ----------------- EMPTY ----------- ferret_server.log ----------------- call index method: highlight with [13, "Topic", "jesse", {:field=>:ferret_name, :excerpt_length=>150, :num_excerpts=>1, :pre_tag=>"<strong>", :post_tag=>"</strong>"}] call index method: highlight with [13, "Topic", "jesse", {:field=>:ferret_content, :excerpt_length=>150, :num_excerpts=>1, :pre_tag=>"<strong&gt...
2007 Jun 07
3
:store => :yes doesn''t work in some cases
...;'t need to load each result model from the rails DB when displaying the results. This is the code that I use to show each result: highlighted_name = result.highlight(params[:q], :field => :ferret_name, :pre_tag => "<strong>", :post_tag => "</strong>", :excerpt_length => 150, :num_excerpts => 1) highlighted_content = result.highlight(params[:q], :field => :ferret_content, :pre_tag => "<strong>", :post_tag => "</strong>", :excerpt_length => 150, :num_excerpts => 1) Generally this all works fine. The problem h...
2007 Jul 06
0
Highlighting returns entire field in Ferret trunk?
Hello, I''m using Ferret trunk (#770) with Kyle''s large file support patch: http://ferret.davebalmain.com/trac/ticket/215 I''m having trouble with Ferret::Search::Searcher#highlight returning too much text around the query term. Regardless of what I set :excerpt_length to, highlight returns the entire contents of the field up to the first occurrence of the search term. Any suggestions? -Stuart
2006 Dec 01
1
Effective search when knowing ID
...score of #{score}" highlights = index.highlight(content_query, id, :field => :content, :pre_tag => "\033[36m", :post_tag => "\033[m", :excerpt_length => 100) puts highlights end Please comment of this! Can I make my database PK id to be the ferret document ID?? Would that speed it up? Cheers, Henrik