Enabling the Solr administrative interface
You can monitor Solr in WebSphere Commerce Search using the Solr administrative interface. The Solr native administrative interface can be used to gather runtime statistics for each Solr core that is running on the search server. It can also be used to perform simple search queries.
Before you begin
About this task
For more information, see SolrAdminGUI.
Procedure
- Import the Search_eardir/Search-Solr.war project into your workspace.
-
Copy the following directories and files from the downloaded Solr.war file
into a location that depends on whether you are working in a developer or runtime environment.
Files to be copied:
- css
- img
- js
- tpl
- admin.html
- favicon.ico
- If you are working in a development environment, place the files in the Search-Solr/WebContent directory.
- Alternatively, if you want to enable the Solr administrative interface in a runtime
environment, copy the files to the following locations:
Search_eardir/Search-Solr.war
Search_eardir/deployments/Search_demo/Search-Solr.war
Alternatively, to enable the Solr administrative interface in a runtime environment, perform the steps to the following locations:- Search_eardir/Search-Solr.war
- Search_eardir/deployments/Search_demo/Search-Solr.war
- Open the Search-Solr/WebContent/WEB-INF/ibm-web-ext.xml file for editing.
-
Find the
enable-file-serving
flag and set it to true.For example:<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 files.
- Deploy the Search-Solr project; Right-click the project and select .
-
Update the following files:
- 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:- Change it to
/solr
For example:<servlet-mapping> <servlet-name>SolrSearchServlet</servlet-name> <url-pattern>/solr</url-pattern> </servlet-mapping>
- Change it to
- Save your changes and close the files.
- Publish the search EAR.
-
Use the following URL to access the Solr administrative interface:
- http://hostname:3737/solr/admin.html