[Xapian-devel] how to index with different type of database

Olly Betts olly at survex.com
Sun Feb 16 20:16:40 GMT 2014


On Sun, Feb 16, 2014 at 10:19:05PM +0800, Hurricane Tong wrote:
> I'm trying to build a benchmark database indexing some documents from
> wikipedia. I want to index these documents with flint, chert and
> brass, to learn the difference of their performance in searching, as
> you did in #326.

I wouldn't bother looking at flint (and flint is gone on trunk, which is
the branch where you should be doing new development, such as GSoC
projects).

Also, brass on trunk has some changes over brass in 1.2 - the biggest
is that positional data is now stored with a different key order, which
speeds up phrase searching significantly.

> But I don't find some parameters of omindex to change
> the type of database, or some useful API. To realize this, must I
> modify the source code of Omega, or indexing with old version Xapian ?

You can set environmental variable XAPIAN_PREFER_BRASS to a non-empty
value (and ensure it's exported so it's passed to the process) to
get brass used by default.  You can do this just for one run like so:

XAPIAN_PREFER_BRASS=1 omindex [...]

Or set it as a default (for the current shell):

export XAPIAN_PREFER_BRASS=1

And then just run omindex as before:

omindex [...]

Note that this only affects creating a new database - if the database
already exists, it won't try to change its type.

Cheers,
    Olly



More information about the Xapian-devel mailing list