lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Raible, Matt" <Matt_Rai...@cable.comcast.com>
Subject access denied to indexDir/segments
Date Fri, 18 Jul 2003 17:35:43 GMT
I'm trying to implement Lucene in Roller (www.rollerweblogger.org) and I'm
running into a few hurdles.  First, the architecture.

I'm planning on having different index directories for each user, in the
format indexDir/username.  This will allow a single site to be indexed, or I
can loop through all the users and index them all. We're going to leave up
the "indexing" to the site admin, and there will be buttons (on a JSP) that
allow indexing of individual sites, or all sites.  Does this sound
reasonable?  

Mainly, we don't want users to index their own sites for performance
reasons.  So if someone attempts to search a user's site, and no index
exists, we'd like to display a message saying "this site hasn't been
indexed".  However, I'm having issues with this:

	// throw an error if no index exists
	if (!IndexReader.indexExists(mIndexDir)) {
		throw new IndexNotCreatedException("No index directory
exists at: " 
			  					+
mIndexDir);
	}

Is this the proper way to test for an index, or should I just use:

File dirPath = new File(indexDir);
if (!dirPath.exists()) {
		throw new IndexNotCreatedException("No index directory
exists at: " 
			  					+
mIndexDir);
}

Also, when create an index, do I need to create the directory
index/username, or will "new IndexWriter(indexPath, null, true)" do this for
me?

Thanks,

Matt

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


Mime
View raw message