John,

This is exactly what I've been looking for... I guess I didn't know about the reader!

Thank you,

Philippe

On 30-May-07, at 3:49 PM, John Bachir wrote:

On May 30, 2007, at 1:40 PM, Philippe April wrote:
I am just wondering if there's a way to get all the words from an
index. Basically, all the words that have been indexed (excluding the
stopwords if I'm using the stopwords analyzer, etc.)


perhaps something like this:

th_hash = {}
Resource.aaf_index.ferret_index.reader.terms(:body).each {|t, f| term_hash[t] = f }
th_sorted = term_hash.sort {|a,b| a[1]<=>b[1]}.reverse

Cheers,
John

_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk

_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk

Reply via email to