Steps to enable Solr Admin Console:
- Import the Search_eardir/Search-Solr.war project into your workspace.
- Copy the following directories and files from the downloaded Solr.war file into the Search-Solr/WebContent directory:
- css
- img
- js
- tpl
- admin.html
- favicon.ico
- Open the Search-Solr/WebContent/WEB-INF/ibm-web-ext.xml file for editing. (Note: in a production environment, the file that should be modified is in the following location: .../IBM/WebSphere/AppServer/v70/profiles/${profile}/config/cells/cell01/applications/Search.ear/deployments/${instance}/Search-Solr.war/WEB-INF/ibm-web-ext.xml, NOT the one in this location: .../IBM/WebSphere/AppServer/v70/profiles/{profile}/installedApps/${cell}/Search.ear/Search-Solr.war/WEB-INF/ibm-web-ext.xml
- Find the enable-file-serving flag and set it to true.For example, in bold:
<web-ext xmlns="http://websphere.ibm.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://websphere.ibm.com/xml/ns/javaee http://websphere.ibm.com/xml/ns/javaee/ibm-web-ext_1_0.xsd" version="1.0"> <reload-interval value="3"/> <context-root uri="/solr" /> <enable-directory-browsing value="false"/> <enable-file-serving value="true"/> <enable-reloading value="false"/> <enable-serving-servlets-by-class-name value="false" /> </web-ext>
- Save your changes and close the file.
- Deploy the Search-Solr project; Right-click the project and select .
- Update the following files:
- (Developer)Search-Solr.war/WEB-INF/web.xml
- Search-Solr.war/WEB-INF/web.xml
- Solr_cell/applications/solr.ear/deployments/solr/Search-Solr.war/WEB-INF/web.xml
- Change the URL pattern for the SolrSearchServlet servlet:
- (FEP7)Change it to /Search-Solr
- (FEP8)Change it to /solr
For example: (FEP7) (Note: I used the /solr as FEP8 and it works)
(FEP8)<servlet-mapping> <servlet-name>SolrSearchServlet</servlet-name> <url-pattern>/Search-Solr</url-pattern> </servlet-mapping>
<servlet-mapping> <servlet-name>SolrSearchServlet</servlet-name> <url-pattern>/solr</url-pattern> </servlet-mapping>
- Save your changes and close the files.
- Publish the search EAR.
- Use the following URL to access the Solr administrative interface:
- (FEP7)http://localhost/Search-Solr/admin.html
- (FEP8)http://hostname:3737/solr/admin.html
- For more information, see SolrAdminGUI.
- Lucene Index Toolbox (Luke)
- Luke is a development and diagnostic tool for search indexes. It enables you to display and modify search index content. For more information, seeLuke - Lucene Index Toolbox.
- WebSphere Application Server JMX clients
- JMX clients can read runtime statistics from Solr.
- To set up the client:
- Add the JMX registry in the Solr core configuration file, solrconfig.xml:
<jmx serviceURL="service:jmx:iiop://host_name:2809/jndi/JMXConnector"/>
- Use jconsole in Rational Application Developer to connect to the runtime JMX.When the Solr core is initialized, you can use jconsole to view information from JMX, such as statistics information for caches.
- Add the JMX registry in the Solr core configuration file, solrconfig.xml:
- For more information, see SolrJmx.
Note:
1. If you don't set the
<enable-file-serving value="true"/>
as instructed in step 4 (remember the location is:
.../IBM/WebSphere/AppServer/v70/profiles/${profile}/config/cells/cell01/applications/Search.ear/deployments/${instance}/Search-Solr.war/WEB-INF/ibm-web-ext.xml) , you may get this exception:
[1/1/15 12:00:00:000 PST] 0000003d SolrDispatchF E org.apache.solr.common.SolrException log null:java.lang.NullPointerException at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:196) at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:155)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:186)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:125)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:80)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:908)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:997)
at com.ibm.ws.webcontainer.webapp.WebApp.invokeFilters(WebApp.java:4044)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3971)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:276)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:945)
at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1592)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:191)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:453)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:515)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:306)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:277)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:175)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1660)
2. If you would like to let the web app handle some static pages, you may add the following to the web.xml file (again, find the right location in the config directory):
<servlet>
<servlet-name>FileServlet</servlet-name>
<servlet-class>com.ibm.ws.webcontainer.servlet.SimpleFileServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>FileServlet</servlet-name>
<url-pattern>hello.html</url-pattern>
</servlet-mapping>
No comments:
Post a Comment