What do you mean saying "more thoroughly". This is code from my application and it works great.<br><br> page_num = @params['page'] ? @params['page'].to_i : 1<br> <br> total_hits = index.search_each(query, :num_docs => PAGE_SIZE, :first_doc => PAGE_SIZE*(page_num-1)) do |doc_num, score|
<br> @documents << index[doc_num]<br> end<br><br> @document_pages = Paginator.new self, total_hits, PAGE_SIZE, page_num<br><br>Is it makes sense to put it to "HowTos" page??<br><br><br><div><span class="gmail_quote">
On 12/2/05, <b class="gmail_sendername">Carl Youngblood</b> <<a href="mailto:carl@youngbloods.org">carl@youngbloods.org</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
No doubt I just needed to scour the documentation more thoroughly, but<br>thanks for the help.<br><br>Carl<br><br>On 12/1/05, David Balmain <<a href="mailto:dbalmain.ml@gmail.com">dbalmain.ml@gmail.com</a>> wrote:<br>
> Hi Carl,<br>><br>> This is easy. If you use the search method (not search_each) a TopDocs<br>> object is returned which has the attribute total hits. Or you can<br>> continue to use the search_each method like this;
<br>><br>> total_hits = index.search_each("query") {|doc, score| puts "doc"}<br>><br>> Hope this helps,<br>> Dave<br><br>_______________________________________________<br>Ferret-talk mailing list
<br><a href="mailto:Ferret-talk@rubyforge.org">Ferret-talk@rubyforge.org</a><br><a href="http://rubyforge.org/mailman/listinfo/ferret-talk">http://rubyforge.org/mailman/listinfo/ferret-talk</a><br></blockquote></div><br><br clear="all">
<br>-- <br>anatol (<a href="http://pomozov.info">http://pomozov.info</a>)