[Ruby] Ferret Search

Neil Moomey neil at motznik.com
Fri Jan 18 11:26:25 PST 2008


I'm using Ferret (Lucene) for a web search.  Is there a way to query with
"group by" or "distinct" so it returns a unique list?  Right now I'm doing
it with Ruby but I use Ferret's :offset and :limit for paging results.  If I
page 20 at a time then drop dups each page is variable length.  I need it to
return 20 unique results.

My Ferret query looks like:

index.search_each(query, :sort => "name", :limit => limit, :offset =>
offset) do |id, score|

-- 
Neil Moomey
Software Developer
Motznik Information Services
8301 Briarwood Street, Suite 100
Anchorage, AK 99518
Ph. 907.344.6254  Fax: 907.344.1759


More information about the Ruby mailing list