Skip to content

Programmatically accessing sups index

Gaute Hope edited this page Aug 14, 2013 · 1 revision

To get access to the Sup index from e.g. an interactive interpreter you can set it up with something like (first go to the sup.git/devel folder):

$ irb -I../lib -r './start-console'
> x = Index.instance.instance_variable_get :@xapian # the xapian DB instance
> ...

you'd have to poke a bit around in the source code to figure out what to do next, lib/sup/index.rb shows you what exists. But perhaps bin/sup-sync or bin/sup-dump are useful examples.

Clone this wiki locally