Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Apache Solr PHP Integration

You're reading from  Apache Solr PHP Integration

Product type Book
Published in Nov 2013
Publisher Packt
ISBN-13 9781782164920
Pages 118 pages
Edition 1st Edition
Languages
Author (1):
Jayant Kumar Jayant Kumar
Profile icon Jayant Kumar

Table of Contents (15) Chapters

Apache Solr PHP Integration
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Installing and Integrating Solr and PHP Inserting, Updating, and Deleting Documents from Solr Select Query on Solr and Query Modes (DisMax/eDisMax) Advanced Queries – Filter Queries and Faceting Highlighting Results Using PHP and Solr Debug and Stats Component Spell Check in Solr Advanced Solr – Grouping, the MoreLikeThis Query, and Distributed Search Index

Installing Solr


Solr requires the presence of Java on your system. To check the presence of Java on your system, run java –version in Linux console or Windows command prompt. If the version of Java is greater than 1.6 then we are ready to go. It is preferable to use the official Java Runtime Environment rather than the one provided by OpenJDK.

c:\>java -version
java version "1.6.0_18"
Java(TM) SE Runtime Environment (build 1.6.0_18-b07)
Java HotSpot(TM) Client VM (build 16.0-b13, mixed mode, sharing)

Let us download the latest Solr. For this book we are using Solr Version 4.3.1, which can be downloaded from the following link:

http://lucene.apache.org/solr/downloads.html

To install Solr on Windows or Linux simply unzip or extract the solr-4.3.1.zip file into a folder. The installation process for Windows and Linux is as follows:

  • For installation on Windows, simply right-click on the zip file and extract it into the C:\solr-4.3.1 folder. To start Solr, go to the Windows command prompt Start | Run. In the Run window, type cmd. On the Windows command prompt type the following:

    cd C:\solr-4.3.1\example
    java –jar start.jar
    
  • For installation on Linux, simply extract the zip file in your home folder. Follow these commands to extract and run Solr using your console:

    unzip solr-4.3.1.zip
    cd ~/solr-4.3.1/example
    java –jar start.jar
    

When we start Solr with the java –jar start.jar option, Solr runs on the port 8983. It uses a built-in web server known as jetty. To see Solr working, simply point your browser to the following address:

http://localhost:8983/solr/

You will be able to see the following interface. This means that Solr is running fine. The following screenshot shows the Solr Admin interface:

You have been reading a chapter from
Apache Solr PHP Integration
Published in: Nov 2013 Publisher: Packt ISBN-13: 9781782164920
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}