This post originated from an RSS feed registered with Ruby Buzz
by Patrick May.
Original Post: Full text indexing with Swish-e
Feed Title: not another ruby framework
Feed URL: http://feeds.feedburner.com/Narf
Feed Description: Developing the Ruby platform, no shortcuts.
Swish-e is a command-line full text indexer similar to ht://Dig. Swish-e sports a brilliant hack. When indexing, one can ask Swish-e to index the output of a command:
swish-e -S prog -i ./output_documents.rbThe output_documents.rb dumps out a series of html documents:
#!/usr/bin/ruby
require 'dbi'
require 'pp'
dbh = DBI.connect("dbi:Mysql:test:localhost", "user", "pass")
# get server version