In article email@example.com
On Fri, May 22, 2009 at 7:08 PM, Ken B. firstname.lastname@example.org wrote:
I’m looking to use an inverted index for Ruby. There used to be Zed
Shaw’s Ruby/odeum that did this using QDBM’s inverted index API. I can
find references to this all over the web, unfortuntely but the original
site is gone and I can’t find any mirrors.
Can anybody help me out?
If not maybe you would care to explain what is an inverted index please ;).
An inverted index is an index from terms to the documents that they
appear in. Typically drawn as:
word1 -> doc1, doc2, doc3, doc4
word2 -> doc1, doc4, doc7, doc12
word3 -> doc5, doc6, doc7, doc12
It could be expressed as a Hash of Arrays, but when you start
operating on even medium-small text collections, it can get
inefficient to load the whole thing into RAM when you don’t need