|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.solr.core.SolrCore
public final class SolrCore
Field Summary | |
---|---|
static java.util.logging.Logger |
log
|
static SolrIndexConfig |
mainIndexConfig
|
static java.lang.String |
version
|
Constructor Summary | |
---|---|
SolrCore(java.lang.String dataDir,
IndexSchema schema)
|
Method Summary | |
---|---|
void |
close()
|
void |
closeSearcher()
|
void |
execute(SolrQueryRequest req,
SolrQueryResponse rsp)
Deprecated. |
void |
execute(SolrRequestHandler handler,
SolrQueryRequest req,
SolrQueryResponse rsp)
|
protected void |
finalize()
|
java.lang.String |
getDataDir()
|
java.lang.String |
getIndexDir()
|
QueryResponseWriter |
getQueryResponseWriter(SolrQueryRequest request)
Returns the appropriate writer for a request. |
QueryResponseWriter |
getQueryResponseWriter(java.lang.String writerName)
Finds a writer by name, or returns the default writer if not found. |
SolrRequestHandler |
getRequestHandler(java.lang.String handlerName)
Get the request handler registered to a given name. |
java.util.Map<java.lang.String,SolrRequestHandler> |
getRequestHandlers()
Returns an unmodifieable Map containing the registered handlers |
IndexSchema |
getSchema()
|
RefCounted<SolrIndexSearcher> |
getSearcher()
|
RefCounted<SolrIndexSearcher> |
getSearcher(boolean forceNew,
boolean returnSearcher,
java.util.concurrent.Future[] waitSearcher)
Get a SolrIndexSearcher or start the process of creating a new one. |
static SolrCore |
getSolrCore()
|
long |
getStartTime()
|
UpdateHandler |
getUpdateHandler()
RequestHandlers need access to the updateHandler so they can all talk to the same RAM indexer. |
static void |
log(java.lang.Throwable e)
|
SolrIndexSearcher |
newSearcher(java.lang.String name)
|
static java.util.List<SolrEventListener> |
parseListener(java.lang.String path)
|
SolrRequestHandler |
registerRequestHandler(java.lang.String handlerName,
SolrRequestHandler handler)
Registers a handler at the specified location. |
protected void |
setResponseHeaderValues(SolrRequestHandler handler,
NamedList<java.lang.Object> responseHeader,
SolrQueryRequest req,
SolrQueryResponse rsp)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String version
public static java.util.logging.Logger log
public static SolrIndexConfig mainIndexConfig
Constructor Detail |
---|
public SolrCore(java.lang.String dataDir, IndexSchema schema)
Method Detail |
---|
public long getStartTime()
public static java.util.List<SolrEventListener> parseListener(java.lang.String path)
public IndexSchema getSchema()
public java.lang.String getDataDir()
public java.lang.String getIndexDir()
public SolrIndexSearcher newSearcher(java.lang.String name) throws java.io.IOException
java.io.IOException
public static SolrCore getSolrCore()
public void close()
protected void finalize()
finalize
in class java.lang.Object
public SolrRequestHandler getRequestHandler(java.lang.String handlerName)
public java.util.Map<java.lang.String,SolrRequestHandler> getRequestHandlers()
public SolrRequestHandler registerRequestHandler(java.lang.String handlerName, SolrRequestHandler handler)
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.
SolrRequestHandler
registered to this name null
if none.public UpdateHandler getUpdateHandler()
public RefCounted<SolrIndexSearcher> getSearcher()
public RefCounted<SolrIndexSearcher> getSearcher(boolean forceNew, boolean returnSearcher, java.util.concurrent.Future[] waitSearcher) throws java.io.IOException
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 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.
forceNew
- if true, force the open of a new index searcher regardless if there is already one open.returnSearcher
- if true, returns a SolrIndexSearcher
holder with the refcount already incremented.waitSearcher
- if non-null, will be filled in with a Future
that will return after the new searcher is registered.
java.io.IOException
public void closeSearcher()
public void execute(SolrRequestHandler handler, SolrQueryRequest req, SolrQueryResponse rsp)
@Deprecated public void execute(SolrQueryRequest req, SolrQueryResponse rsp)
protected void setResponseHeaderValues(SolrRequestHandler handler, NamedList<java.lang.Object> responseHeader, SolrQueryRequest req, SolrQueryResponse rsp)
public static final void log(java.lang.Throwable e)
public final QueryResponseWriter getQueryResponseWriter(java.lang.String writerName)
public final QueryResponseWriter getQueryResponseWriter(SolrQueryRequest request)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |