| java.lang.Object org.apache.solr.core.SolrCore
SolrCore | final public class SolrCore (Code) | | author: yonik author: Mike Baranczak version: $Id: SolrCore.java 542679 2007-05-29 22:28:21Z ryan $ |
Method Summary | |
public void | close() | public void | closeSearcher() | public void | execute(SolrRequestHandler handler, SolrQueryRequest req, SolrQueryResponse rsp) | public void | execute(SolrQueryRequest req, SolrQueryResponse rsp) | protected void | finalize() | public String | getDataDir() | public String | getIndexDir() | final public QueryResponseWriter | getQueryResponseWriter(String writerName) Finds a writer by name, or returns the default writer if not found. | final public QueryResponseWriter | getQueryResponseWriter(SolrQueryRequest request) Returns the appropriate writer for a request. | public SolrRequestHandler | getRequestHandler(String handlerName) Get the request handler registered to a given name. | public Map<String, SolrRequestHandler> | getRequestHandlers() | public IndexSchema | getSchema() | public RefCounted<SolrIndexSearcher> | getSearcher() | public RefCounted<SolrIndexSearcher> | getSearcher(boolean forceNew, boolean returnSearcher, Future[] waitSearcher) Get a
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).
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
RefCounted <
SolrIndexSearcher > will be returned with
the reference count incremented. | public static SolrCore | getSolrCore() | public long | getStartTime() | public UpdateHandler | getUpdateHandler() RequestHandlers need access to the updateHandler so they can all talk to the
same RAM indexer. | void | initIndex() | final public static void | log(Throwable e) | public SolrIndexSearcher | newSearcher(String name) | public static List<SolrEventListener> | parseListener(String path) | public SolrRequestHandler | registerRequestHandler(String handlerName, SolrRequestHandler handler) Registers a handler at the specified location. | protected void | setResponseHeaderValues(SolrRequestHandler handler, NamedList<Object> responseHeader, SolrQueryRequest req, SolrQueryResponse rsp) |
close | public void close()(Code) | | |
closeSearcher | public void closeSearcher()(Code) | | |
finalize | protected void finalize()(Code) | | |
getQueryResponseWriter | final public QueryResponseWriter getQueryResponseWriter(String writerName)(Code) | | Finds a writer by name, or returns the default writer if not found.
|
getQueryResponseWriter | final public QueryResponseWriter getQueryResponseWriter(SolrQueryRequest request)(Code) | | Returns the appropriate writer for a request. If the request specifies a writer via the
'wt' parameter, attempts to find that one; otherwise return the default writer.
|
getRequestHandler | public SolrRequestHandler getRequestHandler(String handlerName)(Code) | | Get the request handler registered to a given name.
This function is thread safe.
|
getSearcher | public RefCounted<SolrIndexSearcher> getSearcher(boolean forceNew, boolean returnSearcher, Future[] waitSearcher) throws IOException(Code) | | Get a
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).
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
RefCounted <
SolrIndexSearcher > will be returned with
the reference count incremented. It must be decremented when no longer needed.
If waitSearcher!=null and a new
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.
Parameters: forceNew - if true, force the open of a new index searcher regardless if there is already one open. Parameters: returnSearcher - if true, returns a SolrIndexSearcher holder with the refcount already incremented. Parameters: waitSearcher - if non-null, will be filled in with a Future that will return after the new searcher is registered. throws: IOException - |
getStartTime | public long getStartTime()(Code) | | |
getUpdateHandler | public UpdateHandler getUpdateHandler()(Code) | | RequestHandlers need access to the updateHandler so they can all talk to the
same RAM indexer.
|
initIndex | void initIndex()(Code) | | |
registerRequestHandler | public SolrRequestHandler registerRequestHandler(String handlerName, SolrRequestHandler handler)(Code) | | Registers a handler at the specified location. If one exists there, it will be replaced.
To remove a handler, register null at its path
Once registered the handler can be accessed through:
http://${host}:${port}/${context}/${handlerName}
or:
http://${host}:${port}/${context}/select?qt=${handlerName}
Handlers must be initalized before getting registered. Registered
handlers can immediatly accept requests.
This call is thread safe.
the previous SolrRequestHandler registered to this name null if none. |
|
|