Changeset 276

Show
Ignore:
Timestamp:
04/26/08 02:48:58 (7 months ago)
Author:
eric.dumin..@gmail.com
Message:

Deprecated precaution removed.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/picolena/templates/app/models/finder.rb

    r275 r276  
    1818    @matching_documents=[] 
    1919    start=Time.now 
    20     @total_hits = index.search_each(query, :limit => @per_page, :offset=>@offset){|index_id, score| 
    21       begin 
    22         found_doc=Document.new(index[index_id][:complete_path]) 
    23         found_doc.matching_content=index.highlight(query, index_id, 
    24                                                    :field => :content, :excerpt_length => 80, 
    25                                                    :pre_tag => "<<", :post_tag => ">>" 
    26         ) unless @raw_query=~/^\*+\.\w*$/ 
    27         found_doc.score=score 
    28         @matching_documents<<found_doc 
    29       rescue Errno::ENOENT 
    30         #"File has been moved/deleted!" 
    31       end 
     20      @total_hits = index.search_each(query, :limit => @per_page, :offset=>@offset){|index_id, score| 
     21        begin 
     22          found_doc=Document.new(index[index_id][:complete_path]) 
     23          found_doc.matching_content=index.highlight(query, index_id, 
     24                                                     :field => :content, :excerpt_length => 80, 
     25                                                     :pre_tag => "<<", :post_tag => ">>" 
     26          ) 
     27          found_doc.score=score 
     28          @matching_documents<<found_doc 
     29        rescue Errno::ENOENT 
     30          #"File has been moved/deleted!" 
     31        end 
    3232      } 
    3333      @executed=true 
    34       @time_needed=Time.now-start 
     34    @time_needed=Time.now-start 
    3535  end 
    3636