lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rob Outar" <rou...@ideorlando.org>
Subject Thread question
Date Mon, 21 Apr 2003 13:30:10 GMT

	This is more of a Java language question but it does involve Lucene as
well.  I have a 3 tier index structure.  I have a RepositoryFile class which
extends java.io.File, folks create those at the directory in which they
would like to search.  Then there is a RepositorySearcher class (one
instance for each repository) which is the class RepositoryFile calls to do
the querying.  For manipulating the index there is an Index Manger class
that adds and removes stuff from the index.  The problem I am encountering
is threads are trying to write/delete from the index when another thread is
doing the same.  The methods in the middle tier which calls the Index
Manager tier are all synchronized yet I am getting requests for concurrent
write/delete operations.  I am getting several IOExceptions saying the index
is locked for wiring (the write.lock IOExceptions Lucene throws).  I figured
by synchronizing the methods in the RepositorySearcher class (which calls
Index Manager class to modify the index) it would make the program thread
safe.  I am new to whole multithreading environment, am I doing something
wrong here?

	Also, I assume it is ok to query the index while a write/delete is
occurring?

	Let me know.

Thanks,

Rob


---------------------------------------------------------------------
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