This section provides an overview of what solr is, and why a developer might want to use it.
It should also mention any large subjects within solr, and link out to the related topics. Since the Documentation for solr is new, you may need to create initial versions of those related topics.
Solr is a standalone enterprise search server with a REST-like API. You put documents in it (called "indexing") via JSON, XML, CSV or binary over HTTP. You query it via HTTP GET and receive JSON, XML, CSV or binary results. Solr uses the Lucene search library and extends it.
Here are some of the main features that solr provides:
- Advanced Full-Text Search Capabilities
Powered by Luceneā¢, Solr enables powerful matching capabilities including phrases, wildcards, joins, grouping and much more across any data type
Solr is proven at extremely large scales the world over
Solr uses the tools you use to make application building a snap
Solr ships with a built-in, responsive administrative user interface to make it easy to control your Solr instances
Need more insight into your instances? Solr publishes loads of metric data via JMX
Built on the battle-tested Apache Zookeeper, Solr makes it easy to scale up and down. Solr bakes in replication, distribution, rebalancing and fault tolerance out of the box.
Solr's is designed to adapt to your needs all while simplifying configuration
Want to see your updates now? Solr takes advantage of Lucene's Near Real-Time Indexing capabilities to make sure you see your content when you want to see it
Solr publishes many well-defined extension points that make it easy to plugin both index and query time plugins. Of course, since it is Apache-licensed open source, you can change any code you want!
Some solr cool features:
Use Solr's data-driven schemaless mode when getting started and then lock it down when it's time for production.
Solr ships with optional plugins for indexing rich content (e.g. PDFs, Word), language detection, search results clustering and more
Slice and dice your data as you see fit using a large array of faceting algorithms
Enabling location-based search is simple with Solr's built-in support for spatial search
Solr ships with advanced capabilites for auto-complete (typeahead search), spell checking and more
Solr ships with Apache Tika built-in, making it easy to index rich content such as Adobe PDF, Microsoft Word and more.
The following procedure was tested on a test instance in AWS, with Redhat and Solr 6.1.0
. You may need to adjust the process to your operating system and environment accordingly.
Make sure you use RedHat or a similar (Fedora-based) OS.
cat /etc/redhat-release
displays your OS version.
Install Java if necessary
sudo yum list available java*
sudo yum install java-1.8.0-openjdk.x86_64
Check if it is installed correctly
which java
displays the Java home
java -version
displays the Java version
Create a SOLR user.
sudo adduser solr
Enable sudo on the SOLR user, run visudo
sudo visudo
Find the following lines:
## Allows people in group wheel to run all commands
# %wheel ALL=(ALL) ALL
If %wheel
is commented out, uncomment the second line by removing the # character.
%wheel ALL=(ALL) ALL
If you made a change use :wq
otherwise use :q
to quit.
Add the solr user to the wheel group.
sudo usermod -aG wheel solr
Switch over to the solr
user an check if you have root privileges:
su solr -
sudo whoami
Find your local mirror at: http://www.apache.org/dyn/closer.lua/lucene/solr/
Change your directory location to opt:
cd /opt/
Download a copy of the package from the mirror:
sudo curl -O http://www.trieuvan.com/apache/lucene/solr/6.1.0/solr-6.1.0.tgz
Untar the package:
sudo tar zxvf solr-6.1.0.tgz
Copy the installer script to your folder:
sudo cp /opt/solr-6.1.0/bin/install_solr_service.sh .
Remove the unnecessary files:
sudo rm -rf solr-6.1.0
sudo ./install_solr_service.sh solr-6.1.0.tgz
sudo chkconfig --add solr
chkconfig | grep solr
sudo chown -R solr:solr /var/solr/
sudo su - solr -c "/opt/solr/bin/solr create -c NewCore1 -n data_driven_schema_configs"
http://<solr_server>:8983/solr/#/
sudo service solr restart
http://<solr_server>:8983/solr/#/
Make sure the Admin page reloads and the core reappears after the reboot.sudo service solr status
cd var/solr/data/
ll
ll NewCore1/
mkdir CoreFromWebAdmin
sudo cp -R NewCore1/conf/ CoreFromWebAdmin
<add><doc>
<field name="id">F9V7464-APL-KIT</field>
<field name="name">Belkin Mobile Power Cord for iPod w/ Dock</field>
<field name="manu">Belkin</field>
<!-- Join -->
<field name="manu_id_s">belkin</field>
<field name="cat">electronics</field>
<field name="cat">connector</field>
<field name="features">car power adapter, white</field>
<field name="weight">4.0</field>
<field name="price">19.95</field>
<field name="popularity">1</field>
<field name="inStock">false</field>
<!-- Buffalo store -->
<field name="store">45.18014,-93.87741</field>
<field name="manufacturedate_dt">2005-08-01T16:30:25Z</field>
</doc>
<doc>
<field name="id">IW-032</field>
<field name="name">iPod & iPod Mini USB 2.0 Cable</field>
<field name="manu">Belkin</field>
<!-- Join -->
<field name="manu_id_s">belkin</field>
<field name="cat">electronics</field>
<field name="cat">connector</field>
<field name="features">car power adapter for iPod, white</field>
<field name="weight">2.0</field>
<field name="price">11.50</field>
<field name="popularity">1</field>
<field name="inStock">false</field>
<!-- San Francisco store -->
<field name="store">37.7752,-122.4232</field>
<field name="manufacturedate_dt">2006-02-14T23:55:59Z</field>
</doc>
<doc>
<field name="id">F887464-APL-KIT</field>
<field name="name">Belkin Mobile Power Cord for iPod w/ Dock</field>
<field name="manu">Belkin</field>
<!-- Join -->
<field name="manu_id_s">belkin</field>
<field name="cat">electronics</field>
<field name="cat">connector</field>
<field name="features">car power adapter, black</field>
<field name="weight">4.0</field>
<field name="price">19.95</field>
<field name="popularity">1</field>
<field name="inStock">true</field>
<!-- Buffalo store -->
<field name="store">45.18014,-93.87741</field>
</doc>
<doc>
<field name="id">FAV7464-APL-KIT</field>
<field name="name">Belkin Mobile Power Cord for iPod w/ Dock</field>
<field name="manu">Belkin</field>
<!-- Join -->
<field name="manu_id_s">belkin</field>
<field name="cat">electronics</field>
<field name="cat">connector</field>
<field name="features">car power adapter, blue</field>
<field name="weight">4.0</field>
<field name="price">15.95</field>
<field name="popularity">2</field>
<field name="inStock">true</field>
<!-- Buffalo store -->
<field name="store">45.18014,-93.87741</field>
<field name="manufacturedate_dt">2015-09-21T16:30:25Z</field>
</doc></add>
If your response returns a success, you have successfully installed SOLR and verified your installation.