[ https://issues.apache.org/jira/browse/LUCENE-1026?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12546288 ]
Shai Erera commented on LUCENE-1026: ------------------------------------ Hi I've downloaded the code and tried to run the tests, but I think there are some problems: 1. The delete() method in the test attempts to delete the directory, and not the underlying files. So in effect it does not do anything. 2. Some of the tests that start new threads don't wait for them (by calling join()). That of course causes some Accessors to be removed (after you call closeAllAccessors()), while those threads are sill running. I've fixed those issues in the test. I'd appreciate if you can take a look. Also, in IndexAccessorFactory I've found some issues: 1. I guess you wanted to have it as a Singleton - so I defined a private default constructor to prevent applications from instantiating it. 2. I modified the code of createAccessor to first lookup if an accessor for that directory already exists. It should save the allocation of DefaultIndexAccessor. 3. I modified the implementation of other methods to access the HashMap of accessors more efficiently. I'd appreciate if you can review my fixes. I'll attach them separately. > Provide a simple way to concurrently access a Lucene index from multiple > threads > -------------------------------------------------------------------------------- > > Key: LUCENE-1026 > URL: https://issues.apache.org/jira/browse/LUCENE-1026 > Project: Lucene - Java > Issue Type: New Feature > Components: Index, Search > Reporter: Mark Miller > Priority: Minor > Attachments: DefaultIndexAccessor.java, > DefaultMultiIndexAccessor.java, IndexAccessor.java, > IndexAccessorFactory.java, MultiIndexAccessor.java, SimpleSearchServer.java, > StopWatch.java, TestIndexAccessor.java > > > For building interactive indexes accessed through a network/internet > (multiple threads). > This builds upon the LuceneIndexAccessor patch. That patch was not very > newbie friendly and did not properly handle MultiSearchers (or at the least > made it easy to get into trouble). > This patch simplifies things and provides out of the box support for sharing > the IndexAccessors across threads. There is also a simple test class and > example SearchServer to get you started. > Future revisions will be zipped. > Works pretty solid as is, but could use the ability to warm new Searchers. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]