Apache Solr PHP Integration
eBook - ePub

Apache Solr PHP Integration

Jayant Kumar

Share book
  1. 118 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Apache Solr PHP Integration

Jayant Kumar

Book details
Book preview
Table of contents
Citations

About This Book

In Detail

The Search tool is a very powerful for any website. No matter what type of website, the search tool helps visitors find what they are looking for using key words and narrow down the results using facets. Solr is the popular, blazing fast, open source enterprise search platform from the Apache Lucene project. It is highly scalable, providing distributed search and index replication, and it powers the search and navigation features of many of the world's largest websites.

This book is a practical, hands-on, end-to-end guide that provides you with all the tools required to build a fully-featured search application using Apache Solr and PHP. The book contains practical examples and step-by-step instructions.

Starting off with the basics of installing Apache Solr and integrating it with Php, the book then proceeds to explore the features provided by Solr to improve searches using Php. You will learn how to build and maintain a Solr index using Php, discover the query modes available with Solr, and how to use them to tune the Solr queries to retrieve relevant results. You will look at how to build and use facets in your search, how to tune and use fast result highlighting, and how to build a spell check and auto complete feature using Solr. You will finish by learning some of the advanced concepts required to runa large-scale enterprise level search infrastructure.

Approach

This book is full of step-by-step example-oriented tutorials which will show readers how to integrate Solr in PHP applications using the available libraries, and boost the inherent search facilities that Solr offers.

Who this book is for

If you are a developer who knows PHP and is interested in integrating search into your applications, this is the book for you. No advanced knowledge of Solr is required. Very basic knowledge of system commands and the command-line interface on both Linux and Windows is required. You should also be familiar with the concept of Web servers.

Frequently asked questions

How do I cancel my subscription?
Simply head over to the account section in settings and click on “Cancel Subscription” - it’s as simple as that. After you cancel, your membership will stay active for the remainder of the time you’ve paid for. Learn more here.
Can/how do I download books?
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
What is the difference between the pricing plans?
Both plans give you full access to the library and all of Perlego’s features. The only differences are the price and subscription period: With the annual plan you’ll save around 30% compared to 12 months on the monthly plan.
What is Perlego?
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Do you support text-to-speech?
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Is Apache Solr PHP Integration an online PDF/ePUB?
Yes, you can access Apache Solr PHP Integration by Jayant Kumar in PDF and/or ePUB format, as well as other popular books in Informatique & Programmation Open Source. We have over one million books available in our catalogue for you to explore.

Information

Year
2013
ISBN
9781782164920

Apache Solr PHP Integration


Table of Contents

Apache Solr PHP Integration
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Installing and Integrating Solr and PHP
Solr
Installing Solr
Configuring Tomcat to run Solr
Executing a ping query on Solr using PHP
Libraries available for PHP-Solr integration
Installing Solarium
Executing ping queries on Solr using PHP and Solarium library
More about endpoints
Checking Solr query logs
Solarium adapters
Summary
2. Inserting, Updating, and Deleting Documents from Solr
The Solr schema
Adding sample documents to the Solr index
Using PHP to add documents to the Solr index
Updating documents in Solr using PHP
Deleting documents in Solr using PHP
Commit, rollback, and index optimization
Summary
3. Select Query on Solr and Query Modes (DisMax/eDisMax)
Creating a basic select query with sorting and return fields
Running a query using select configuration
Re-using queries
DisMax and eDisMax query modes
Executing queries using DisMax and eDisMax
Date boosting in an eDisMax query
Advanced query parameters
Summary
4. Advanced Queries – Filter Queries and Faceting
Filter queries and their benefits
Executing filter queries
Creating filter query configuration
Faceting
Facet by field
Facet by query
Facet by range
Facet by pivot
Summary
5. Highlighting Results Using PHP and Solr
Solr highlighting configuration
Highlighting in Solr using PHP and Solarium
Using different highlighting tags for different fields
Highlighting using the fast vector highlighter
Summary
6. Debug and Stats Component
Solr relevance ranking
Executing debug through PHP code
Running debug on Solr interface
The stats component
Summary
7. Spell Check in Solr
Solr configuration for spell check
Spell checker implementations available with Solr
Running a spell check query using PHP
Implementing the autocomplete feature using PHP and Solr
Summary
8. Advanced Solr – Grouping, the MoreLikeThis Query, and Distributed Search
Grouping results by fields
Grouping results by queries
Running more like this query using PHP
More like this tuning parameters
Distributed search
Setting up a distributed search
Executing a distributed search using PHP
Setting up Solr master-slave
Load balancing Solr queries using PHP
Summary
Index

Apache Solr PHP Integration

Copyright © 2013 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: November 2013
Production Reference: 1181113
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78216-492-0
www.packtpub.com
Cover Image by Aniket Sawant ()

Credits

Author
Jayant Kumar
Reviewers
Renoir Boulanger
Ruben Teijeiro
Acquisition Editor
Luke Presland
Commisioning Editor
Amit Ghodake
Technical Editors
Sharvari H. Baet
Nadeem Bagban
Project Coordinator
Suraj Bist
Proofreader
Ting Baker
Indexer
Monica Ajmera Mehta
Production Coordinator
Melwyn D'sa
Cover Work
Melwyn D'sa

About the Author

Jayant Kumar is an experienced software professional and a Bachelor of Engineering in Computer Science, with more than 12 years' of experience in architecting and developing large-scale web applications.
Jayant is an expert on search technologies and PHP and has been working with Lucene and Solr for more than 10 years now. He has been the key person responsible for introducing Lucene as a search engine in www.naukri.com, the most successful job portal in India.
Jayant has played many different important roles throughout his career, including software developer, team leader, project manager, and architect, but his primary focus has been on building scalable solutions on the web. Currently, he is associated with the digital division of HT Media as the Chief Architect responsible for the job site www.shine.com.
Jayant is an avid blogger and his blog can be visited at http://jayant7k.blogspot.in. His LinkedIn profile is available at http://www.linkedin.com/in/jayantkumar.

About the Reviewers

Renoir Boulanger is an application developer fascinated with web standards. He has been developing websites and web applications in PHP for over 10 years. His experience includes server management and web development for several communications agencies in the province of Quebec. He has created web integration libraries, and participated in the development of various specialized web applications, some of which were for big-name clients such as the W3C, Ericsson, Telefilm Canada, and the Union des Artistes du Québec.
Renoir's involvement in the W3C is as a member of developer relations and system teams, mainly contributing to the WebPlatform Docs (http://webplatform.org/) project to maintain the site stability, improve the site feature...

Table of contents