Java Doc for SolrCore.java in  » Search-Engine » apache-solr-1.2.0 » org » apache » solr » core » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Search Engine » apache solr 1.2.0 » org.apache.solr.core 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


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 $


Field Summary
 List<SolrEventListener>firstSearcherListeners
    
public static  Loggerlog
    
public static  SolrIndexConfigmainIndexConfig
    
 List<SolrEventListener>newSearcherListeners
    
final  ExecutorServicesearcherExecutor
    
final public static  Stringversion
    

Constructor Summary
public  SolrCore(String dataDir, IndexSchema schema)
    

Method Summary
public  voidclose()
    
public  voidcloseSearcher()
    
public  voidexecute(SolrRequestHandler handler, SolrQueryRequest req, SolrQueryResponse rsp)
    
public  voidexecute(SolrQueryRequest req, SolrQueryResponse rsp)
    
protected  voidfinalize()
    
public  StringgetDataDir()
    
public  StringgetIndexDir()
    
final public  QueryResponseWritergetQueryResponseWriter(String writerName)
     Finds a writer by name, or returns the default writer if not found.
final public  QueryResponseWritergetQueryResponseWriter(SolrQueryRequest request)
     Returns the appropriate writer for a request.
public  SolrRequestHandlergetRequestHandler(String handlerName)
     Get the request handler registered to a given name.
public  Map<String, SolrRequestHandler>getRequestHandlers()
    
public  IndexSchemagetSchema()
    
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  SolrCoregetSolrCore()
    
public  longgetStartTime()
    
public  UpdateHandlergetUpdateHandler()
     RequestHandlers need access to the updateHandler so they can all talk to the same RAM indexer.
 voidinitIndex()
    
final public static  voidlog(Throwable e)
    
public  SolrIndexSearchernewSearcher(String name)
    
public static  List<SolrEventListener>parseListener(String path)
    
public  SolrRequestHandlerregisterRequestHandler(String handlerName, SolrRequestHandler handler)
     Registers a handler at the specified location.
protected  voidsetResponseHeaderValues(SolrRequestHandler handler, NamedList<Object> responseHeader, SolrQueryRequest req, SolrQueryResponse rsp)
    

Field Detail
firstSearcherListeners
List<SolrEventListener> firstSearcherListeners(Code)



log
public static Logger log(Code)



mainIndexConfig
public static SolrIndexConfig mainIndexConfig(Code)



newSearcherListeners
List<SolrEventListener> newSearcherListeners(Code)



searcherExecutor
final ExecutorService searcherExecutor(Code)



version
final public static String version(Code)




Constructor Detail
SolrCore
public SolrCore(String dataDir, IndexSchema schema)(Code)




Method Detail
close
public void close()(Code)



closeSearcher
public void closeSearcher()(Code)



execute
public void execute(SolrRequestHandler handler, SolrQueryRequest req, SolrQueryResponse rsp)(Code)



execute
public void execute(SolrQueryRequest req, SolrQueryResponse rsp)(Code)



finalize
protected void finalize()(Code)



getDataDir
public String getDataDir()(Code)



getIndexDir
public String getIndexDir()(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.



getRequestHandlers
public Map<String, SolrRequestHandler> getRequestHandlers()(Code)
Returns an unmodifieable Map containing the registered handlers



getSchema
public IndexSchema getSchema()(Code)



getSearcher
public RefCounted<SolrIndexSearcher> getSearcher()(Code)



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 -




getSolrCore
public static SolrCore getSolrCore()(Code)



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)



log
final public static void log(Throwable e)(Code)



newSearcher
public SolrIndexSearcher newSearcher(String name) throws IOException(Code)



parseListener
public static List<SolrEventListener> parseListener(String path)(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.



setResponseHeaderValues
protected void setResponseHeaderValues(SolrRequestHandler handler, NamedList<Object> responseHeader, SolrQueryRequest req, SolrQueryResponse rsp)(Code)



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.