lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rob Outar" <>
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, 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

	Let me know.



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message