lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shane <lucene-u...@my-family.us>
Subject Determining if index exists Lucene 2.1
Date Fri, 23 Feb 2007 18:53:18 GMT
Hi,

Prior to Lucene 2.1, I was using FSDirectory.getDirectory(String path, 
boolean create)|| inside of a try block to determine whether or not a 
directory existed.

With the deprecation of the above class call in Lucene 2.1,  I need a 
new method for determining the existence of an index.  I can just check 
to see if either of the files INDEX_PATH/segments or 
INDEX_PATH/segments.gen exist, but that doesn't seem like the best route.

Is there a function call to determine whether or not an index already 
exists?

Thanks,

Shane

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message