Solr Research — First set up and use tika to search word and PDF files

LORY
2 min readFeb 12, 2023

Save this post in case you need to set up a solr quickly next time.

Install Solr

#1 Make sure java installed

yum install java-11-openjdk

#2 Get the latest version from here. you can either wget or download locally then scp see which way is faster. put it under /opt

#3 extract the installer

tar xzf solr-8.11.1.tgz solr-8.11.1/bin/install_solr_service.sh --strip-components=2

#4 install it using a script

bash ./install_solr_service.sh solr-8.11.1.tgz

#5 Open the port so that could be access UI from the laptop

firewall-cmd --permanent --add-port=8983/tcp
firewall-cmd --reload

#6 start service and enable it on boot

service solr start
chkconfig solr on

#7 Create a core using user solr

su - solr -c "/opt/solr/bin/solr create -c myCore

Now Solr is up. however, if you want to search rich text files (word, PDF, PPT, etc), the supported list is here, you need extra configuration (requestExtractingHandler).

Configure Tika to search PDF and Word files

#1 config request extracting handler

vi /var/solr/data/MyCore/conf/solrconfig.xml

--

--

LORY
LORY

Written by LORY

A channel which focusing on developer growth and self improvement