Installing type-ahead search
Enhanced type-ahead search suggests items in the search box based on content that is relevant to each user.
Before you begin
If you want to make this feature available, go to Fix Central and download the package 5.5.0.0-IC-typeAhead-20151218, which contains all of the Solr code necessary for installing type-ahead.
Procedure
-
Set JAVA_HOME to the appropriate Java Runtime Environment instance. That is,
if you have multiple Java installations, you must provide the path to the location of one that meets
the Solr requirement (Java 7 or later), or you could have issues loading Solr.
-
Open a text editor and from your home directory (that is /home/username),
and open the shell script file to which you want to add the variable. For example, open
bash_profile.
Note: By default, shell scripts are stored as hidden files. To view hidden files, run the
ls -la
command. - Type the command to add the variable that you want and then save the file. For example, if the Java installation that you want is the folder that is named jre1.7.0_60, type export JAVA_HOME=/usr/java/jre1.7.0_60
- To put your changes into effect, exit the command session and then start a new session.
-
Open a text editor and from your home directory (that is /home/username),
and open the shell script file to which you want to add the variable. For example, open
bash_profile.
- From the download package, copy solr_ssl.tar.gz to your server.
-
Extract the file to /opt/IBM/solr by running the following command in a
command line.
tar -zxvf solr_ssl.tar.gz -C /opt/IBM/solr
- Change to the working folder directory. Enter the command cd /opt/IBM/solr/solr-4.7.2.
-
Log in to the IBM WebSphere Application Server administrative console and navigate to Security > SSL certificate and key management > Key stores and certificates > CellDefaultTrustStore > Signer certificates. (Do not use the certificates from the nodedefault truststore). Extract the root
certificate (not the webServer certificate). Rename this file to root.crt and
save it to the /opt/IBM/solr/solr-4.7.2 folder.
-
From the same session in which you set JAVA_HOME in step 1, run ./import-cert.sh to make sure that the certificate is
configured correctly.
The command returns the keystore contents. The results resemble the following example.
solrtest, Feb 13, 2013, PrivateKeyEntry, Certificate fingerprint (SHA1): 7C:F2:F3:FA:1B:C9:08:27:C6:E2:79:34:D7:10:6B:F7:50:47:FA:20 connections, Oct 22, 2015, trustedCertEntry,
-
From the cell default keystore, import the certificate that is called
key.p.12 to your browser, as follows:
- In the Deployment Manager, navigate to /opt/IBM/WebSphere/DeploymentManager/profiles/Dmgr01/config/cells/dubxpcvm927Cell01, and copy the key.p.12 file to your client system.
- In Firefox, import key.p.12 as a trusted key by clicking Tools > Options, Advanced, Certificatestab, and then View Certificates. Click Import, browse to the key.p.12 file, and select it. When prompted for a password, type WebAS and click OK.
-
Run ./start-solr.sh to start the service. Check that
solr-start.log was created and that it contains output. You can access Solr
(from the Firefox client from step 7b) at https://dubxpcvm927.mul.ie.ibm.com:8984/solr.
Note: The server is working properly when the following output starts to display in the logs after searches are made:
org.apache.solr.core.SolrCore; [quick-results-collection] Registered new searcher Searcher@64d597c9[quick-results-collection] main{StandardDirectoryReader(segments_9:38:nrt _a(4.7):C8/1:delGen=1 _b(4.7):C4/3:delGen=2 _c(4.7):C2 _d(4.7):C1 _f(4.7):C1)}
org.apache.solr.core.SolrCore; [quick-results-collection] webapp=/solr path=/select params={q=*:*&hl=true&hl.q=test&start=0&fq={!q.op%3DAND+df%3Dtitle}title:test&fq=user_id:60B70466-8EAD-C812-8525-7BE90078A509&fq=org_id:00000000-0000-0000-0000-000000000000&fq=+-source:PROFILES&hl.fl=title&sort=date+desc&rows=7&wt=javabin&version=2&_route_=60B70466-8EAD-C812-8525-7BE90078A509!} hits=0 status=0 QTime=71