Get a {@link SolrIndexSearcher} or start the process of creating a new one.
The registered searcher is the default searcher used to service queries. A searcher will normally be registered after all of the warming and event handlers (newSearcher or firstSearcher events) have run. In the case where there is no registered searcher, the newly created searcher will be registered before running the event handlers (a slow searcher is better than no searcher).
These searchers contain read-only IndexReaders. To access a non read-only IndexReader, see newSearcher(String name, boolean readOnly).
If forceNew==true then A new searcher will be opened and registered regardless of whether there is already a registered searcher or other searchers in the process of being created.
If forceNew==false then:
- If a searcher is already registered, that searcher will be returned
- If no searcher is currently registered, but at least one is in the process of being created, then this call will block until the first searcher is registered
- If no searcher is currently registered, and no searchers in the process of being registered, a new searcher will be created.
If returnSearcher==true then a {@link RefCounted}< {@link SolrIndexSearcher}> will be returned with the reference count incremented. It must be decremented when no longer needed.
If waitSearcher!=null and a new {@link SolrIndexSearcher} was created,then it is filled in with a Future that will return after the searcher is registered. The Future may be set to null in which case the SolrIndexSearcher created has already been registered at the time this method returned.
@param forceNew if true, force the open of a new index searcher regardless if there is already one open.
@param returnSearcher if true, returns a {@link SolrIndexSearcher} holder with the refcount already incremented.
@param waitSearcher if non-null, will be filled in with a {@link Future} that will return after the new searcher is registered.
@throws IOException