[Xapian-discuss] How to create a Flint database using the Java bindings?

Olly Betts olly at survex.com
Wed Feb 7 04:40:32 GMT 2007


On Tue, Feb 06, 2007 at 01:46:16PM -0500, Jarrod Roberson wrote:
> On 2/6/07, Rafael SDM Sierra <sdm at underlinux.com.br> wrote:
> >
> >On 2/6/07, Jarrod Roberson <jarrod at vertigrated.com> wrote:
> >>
> >> I can't find any examples or documentation on how to create a Flint
> >> database using the Java bindings?

The wiki has a page:

http://wiki.xapian.org/FlintBackend_2fHowToCreateAFlintDatabase

> >Before run your system, just set into environment variable:
> >XAPIAN_PREFER_FLINT=True
> >
> >And run the program.

You also need to export the variable so the shell passes it to the
subprocess:

    export XAPIAN_PREFER_FLINT

Or you can just set it for a single subprocess:

    XAPIAN_PREFER_FLINT=1 ./myxapianapp

Assuming a Bourne-style shell of course...

> I have done this already for the python bindings. I am also having problems
> with the db_lock file not getting cleaned up so I don't think it is working
> correctly.

Only quartz uses a file called "db_lock", so it isn't.

If Python creates flint databases while Java doesn't, I guess the JVM
might be clearing the environment.  That's rather annoying of it.

As a workaround, you can just create an empty flint database from Python
(or whatever) and then open it for update from Java.

> db.flush() doesn't seem to be working correctly either.

You'll need to give more details...

Cheers,
    Olly



More information about the Xapian-discuss mailing list