You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Sidhant Aggarwal <si...@me.com> on 2017/07/06 06:23:24 UTC

Reopen AnalyzingInfixSuggester Multi Threaded

Hi,

Im using the AnalyzingInfixSuggester for my autocomplete.
So i have a singleton object where I am opening the suggester and  keeping the references. Many threads are accessing these references and performing searches. But what i want to do is that my underlying directory where the index is placed is replaced with a new index completely.
So i want to reload this new index and assign it to the singleton indexrefs variable.
How can i achieve this while multiple threads are using these references to perform searches.

I cant use the refresh method on the suggester because that does not reload the index. So to reload i need to close the old one first and reopen it from the same directory.

Thanks.