Save This Page
Home » apache-solr-1.3.0 » org.apache.solr » core » [javadoc | source]
org.apache.solr.core
public final class: SolrCore [javadoc | source]
java.lang.Object
   org.apache.solr.core.SolrCore
Field Summary
public static final  String version     
public static  Logger log     
public static  SolrIndexConfig mainIndexConfig     
 List firstSearcherListeners     
 List newSearcherListeners     
final  ExecutorService searcherExecutor     
Constructor:
 public SolrCore(String dataDir,
    IndexSchema schema) 
Method from org.apache.solr.core.SolrCore Summary:
close,   closeSearcher,   execute,   execute,   finalize,   getDataDir,   getIndexDir,   getQueryResponseWriter,   getQueryResponseWriter,   getRequestHandler,   getRequestHandlers,   getSchema,   getSearcher,   getSearcher,   getSolrCore,   getStartTime,   getUpdateHandler,   initIndex,   log,   newSearcher,   parseListener,   registerRequestHandler,   setResponseHeaderValues
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.solr.core.SolrCore Detail:
 public  void close() 
 public  void closeSearcher() 
 public  void execute(SolrQueryRequest req,
    SolrQueryResponse rsp) 
 public  void execute(SolrRequestHandler handler,
    SolrQueryRequest req,
    SolrQueryResponse rsp) 
 protected  void finalize() 
 public String getDataDir() 
 public String getIndexDir() 
 public final QueryResponseWriter getQueryResponseWriter(String writerName) 
    Finds a writer by name, or returns the default writer if not found.
 public final QueryResponseWriter getQueryResponseWriter(SolrQueryRequest request) 
    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.
 public SolrRequestHandler getRequestHandler(String handlerName) 
    Get the request handler registered to a given name. This function is thread safe.
 public Map getRequestHandlers() 
    Returns an unmodifieable Map containing the registered handlers
 public IndexSchema getSchema() 
 public RefCounted getSearcher() 
 public RefCounted getSearcher(boolean forceNew,
    boolean returnSearcher,
    Future[] waitSearcher) throws IOException 
    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.

 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() 
 public static final  void log(Throwable e) 
 public SolrIndexSearcher newSearcher(String name) throws IOException 
 public static List parseListener(String path) 
 public SolrRequestHandler registerRequestHandler(String handlerName,
    SolrRequestHandler handler) 
    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.
 protected  void setResponseHeaderValues(SolrRequestHandler handler,
    NamedList responseHeader,
    SolrQueryRequest req,
    SolrQueryResponse rsp)