Could not get all matched docs

Hi,
I used Ferret to build an index and try to search here.
But it looks like it always return only 10 matches results,
event the return number of search_each is more than 10.
Did I do something wrong?

n = index.search_each(“ruby”) do |doc, score|
puts index[doc][‘file’]
end

print n


I can only see 10 lines’ output.
But n is 214 in the case.

Thanks in advance for your help!

Donghui

Ok, I just figured it out, I need to add the num_docs parameter:

index.search_each(‘content:“NetScreen”’, :num_docs=> 200

Donghui

Donghui Wen wrote:

Hi,
I used Ferret to build an index and try to search here.
But it looks like it always return only 10 matches results,
event the return number of search_each is more than 10.
Did I do something wrong?

n = index.search_each(“ruby”) do |doc, score|
puts index[doc][‘file’]
end

print n


I can only see 10 lines’ output.
But n is 214 in the case.

Thanks in advance for your help!

Donghui