rbnamazu 0.4

$Id: index.html.en,v 1.3 2004/03/05 06:11:10 satoru Exp $

[English | Japanese]

What is rbnamazu?

Ruby's search client of a full-text search system Namazu

You can search Namazu's indices via Ruby scripts.

You also need OptionParser to use the rbnamazu from a command line.

Differences from the original client of Namazu.

Basic
  1. Namazu-2 index only
About .namazurc
  1. One .namazurc file only
  2. No logging
  3. No language support
  4. Scoring has some minor diferences
  5. No EmphasisTags
About options
  1. '--all' is default
  2. No '--output=FILE'
  3. No '--quiet'
  4. No '--debug'

Download

Install

Copy libraries (rbnamazu.rb, nmzqr.rb, nmzqr.tab.rb, nmzdoc.rb) to a directory which your Ruby loads. Maybe one in ruby -e 'puts $LOAD_PATH'

Usage

Command line
CGI

License

rbnamazu is copyrighted free software by OHSHIMA Ryunosuke. You can use/redistribute/modify it under the terms of Namazu or Ruby.

OHSHIMA Ryunosuke ryu@jaist.ac.jp

rbnamazu

rbnamazu libraries

Class Namazu

nmz = Namazu.new(['/namazu/index1/', '/namazu/index2/'])
puts nmz.query_and_format('foo and (/bar/ or baz*) not {foo bar}')
p nmz.query('foo and (/bar/ or baz*) not "foo bar"', 20, 0)

Superclass:

Object

Class Methods:

Namazu.new(index_list, options)

index_list: Array of Namazu index String. options: Hash of Namazu option.

Methods:

Namazu#query_and_format(querystring, max = nil, whence = nil)

Search querystring matching documents. Return a result in String. If max and/or whence are given, return from whence to whence + max.

Namazu#query(querystring, max = nil, whence = nil)

Search querystring matching documents. Return a result in Array. Each item is Hash ({'field name' -> 'field content'}). If max and/or whence are given, return from whence to whence + max.

Module Namazu::SummaryArray

Array includes this module to hold document information.

Methods:

Namazu::SummaryArray#hitnum()

Return hit number.

Namazu::SummaryArray#hitref()

Return hit references in String.

Namazu::SummaryArray#[i]

Return i-th document (Hash of fields).