News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

SitePoint PHP Blog:
Using Solarium with SOLR for Search - Implementation
May 07, 2014 @ 10:54:10

The SitePoint PHP blog has posted the third part of their series looking at using the Solarium tool to hook your PHP application into a SOLR search instance. In this latest part of the series they get down to the actual search implementation.

In the first part I introduced the key concepts and we installed and set up SOLR. In part two we installed and configured Solarium, a library which enables us to use PHP to "talk" to SOLR as if it were a native component. Now we're finally ready to start building the search mechanism, which is the subject of this installment.

He starts with a simple search example, making a request to select the matches for a given query (given on the URL as a variable "q"). He shows how to run the select and fetch the results as a result set. He enhances this, containing the search logic inside a class and making a template to show the results. He also includes examples of how to use the "Disjunction Max", sorting and pagination functionality. Finally, he looks at a more complex type of search, a faceted search, and includes code examples of making the request and displaying the results.

0 comments voice your opinion now!
solr solarium search engine tutorial implement basics faceted

Link: http://www.sitepoint.com/using-solarium-solr-search-implementation/

blog comments powered by Disqus

Similar Posts

Joseph Crawford's Blog: ZF: Creating RESTful Applications

Chris Hartjes' Blog: Converting Legacy Apps to CakePHP, Part 1

Developer Tutorials Blog: Debugging PHP with Firebug and FirePHP

Software Development Video & Tutorials: PHP and Couchbase

Ralph Schindler's Blog: Compiling Gearman (or anything) for Zend Server CE on Snow Leopard


Community Events





Don't see your event here?
Let us know!


symfony version introduction api unittest language conference laravel community release interview opinion framework series list podcast configure voicesoftheelephpant composer threedevsandamaybe

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework