Lucene's Index opening modes

[prev] [thread] [next] [lurker] [Date index for 2006/09/13]

From: Simon Wistow
Subject: Lucene's Index opening modes
Date: 02:32 on 13 Sep 2006
I don't know about you, dear hates-software reader, but, in general, 
when wanting to write something like an index for a search engine I have 
two major uses cases. 

The first is - open the index and start using it. The second is - open 
the index, if it doesn't exists then create it, then use it.

The number of times I want to open the index and nuke any existing 
comments is small. Even whilst developing a search engine. Still, I can 
imagine it being useful to, you know, someone.

Lucene, the Java based search engine with the hateful documentation, 
seems to think that it is important. Very important. Because it doesn't 
have a "Create if it doesn't exist mode".

I know not why. Sure it's emulatable in my own code. But so would 
throwing an error if it didn't exist. Or deleting all the documents if 
it did exist. 

When you've had 3 hours sleep these things can trip you up and suddenly 
all your indexed data is gone. All of it.

I hate you Lucene. I'm giving you cancer with my thumbs.


Generated at 13:01 on 13 Sep 2006 by mariachi 0.52