On Wed, Jul 20, 2005 at 05:37:21PM -0400, Arshavir Grigorian wrote:
> I would like to try indexing data in a database table. While I got
> dbi2omega to work and print the data, I am still not sure how it all
> works together. What should be done to the output from dbi2omega?
You run it into scriptindex, with an appropriate indexing script - see
the documentation supplied with omega.
> If for example I have a table with 5 fields 2 of which I would like to
> index, like so:
>
> (id primary key,
> title varchar(100),
> name varchar(100),
> description text,
> comments text)
>
> Description and comments should be indexed. What are the steps to do
> that? I am assuming the result of my search is going to be a set of
> primary keys for records that have the search term in one of the indexed
> columns. Is this correct?
You can include data from the table as document data, meaning that
omega can print out more than just the id if desired.
> I am getting a feeling that omega is not designed for this sort of thing
> and that I would have to write a custom indexer/searcher for this. If
> so, any suggestions on how to do this are more than welcome. I am going
> to be using Perl, but I think if I get the algorithm right, I can figure
> out the coding.
omega should work fine for this sort of thing, but if you do want to
write your own indexer and want to use omega for the database, check
out the termprefixes document in the omega docs directory - it
explains what terms omega expects to find, and uses in various
ways. (Or, in some cases, can use but doesn't have to.)
James
--
/--------------------------------------------------------------------------\
James Aylett xapian.org
james@tartarus.org uncertaintydivision.org