News Feed
Sections




News Archive
feed this:

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 - Advanced
May 08, 2014 @ 11:56:46

The SitePoint PHP blog has finished off their series showing you how to integrate searching with SOLR (via Solarium) into your PHP application. In this last part of the series, Lukas White gets into some of the more advanced topics around searching and handling the resulting output in your views.

In the first three parts we installed and configured SOLR and Solarium and started building an example application for searching movies. We've also looked at faceted search. We're going to wrap up the series by looking at some more advanced features of SOLR, and how to use them with Solarium.

He's broken up the rest of the tutorial to talk about a few of these more advanced features like:

  • Highlighting search matches in the output of documents (depending on the type of match)
  • Using the searching for an autocomplete
  • Configuring and making the request with an array-based configuration (a more manual process)
  • Adding additional cores to the search (allowing for more flexibility on search styles and configurations)

He also points to two other resources that could be handy along your path to SOLR dominance: the SOLR reference guide and the official Solarium documentation.

0 comments voice your opinion now!
solr search solarium library tutorial series part4 advanced

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

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/

SitePoint PHP Blog:
Using Solarium with SOLR for Search - Solarium and GUI
May 06, 2014 @ 13:49:34

The SitePoint PHP blog continues their series looking at the use of the Solarium tool to work with the SOLR searching tool in PHP. In this latest part (part two) of the series they move beyond the setup and configuration and get into some actual code to use the server.

This is the second article in a four part series on using Solarium, in conjunction with Apache's SOLR search implementation. In the first part, I introduced the key concepts and we installed and set up SOLR. In this second part we'll install Solarium, start building an example application, populate the search index and get into a position where we can start running searches.

The frontend, based on the Laravel framework, is simple to get up and running with just a few lines of code. They walk you through the basic CRUD kinds of steps, "pinging" the server to ensure it's up and searching the documents you've added.

0 comments voice your opinion now!
solarium solr search gui laravel crud

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

SitePoint PHP Blog:
Using Solarium with SOLR for Search - Setup
May 02, 2014 @ 11:49:16

The SitePoint PHP blog has posted a tutorial showing you how to use the Solarium library to search SOLR. Solarium is a PHP-based, open source tool that helps make interfacing with a SOLR search instance much easier. This post is part one of a larger series covering the combination of SOLR and Solarium.

Apache's SOLR is an enterprise-level search platform based on Apache Lucene. It provides a powerful full-text search along with advanced features such as faceted search, result highlighting and geospatial search. [...] If you're using PHP then the Solarium Project makes integration even easier, providing a level of abstraction over the underlying requests which enables you to use SOLR as if it were a native implementation running within your application. In this series, I'm going to introduce both SOLR and Solarium side-by-side.

He starts with some of the basic concepts behind what SOLR is, what kinds of things it's useful for and how to get it installed on your system (using Homebrew). He shows how to set up a sample schema including a detailed look at the different types and required fields it will need. As this is just the first part of the series, it stops there and will get into the actual PHP code for the interface in the next edition.

0 comments voice your opinion now!
solr solarium search engine tutorial interface opensource library

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

System Architect:
Integrate PHP application with Solr search engine
March 12, 2013 @ 12:01:43

On the "System Architect" site there's a recent post showing you how to integrate PHP and Solr, the searching tool from the Apache project.

So why do you need a search engine, is database not enough? If you create a small website it might not matter. With medium or big size applications it's often wiser to go for a search engine. Saying that, even a small websites can benefit from Solr if you desire a high level of relevance in search results.

Their example involves an ecommerce website and a search for a term (iPhones) and how difficult it could be to match against the possible multiple variations on the models. Solr makes this kind of searching easier. He shows you how to get a Solr instance all set up and configured as well as the PHP PECL extension from here. A sample PHP script is also included showing connecting to Solr, inserting a new document and searching for a simple query of "hello".

0 comments voice your opinion now!
solr search engine tutorial integration pecl extension


Jeroen van Dijk:
Multi-select faceting in Solr with Solarium
November 07, 2012 @ 12:14:14

If you're a user of the Solarium tool for querying Solr database already and have been wondering how to work with faceting, you should take a look at this new post from Jeroen van Dijk. He covers using Solarium to do multi-select faceting in a Solr query.

Solarium is a library I often use at Enrise for querying Solr. For one of the projects I work on, AutoTrack.nl a second hand car site, I was having issues on advanced faceting with Solr which I could easily solve using Solarium. [...] Faceting is a technique for guided navigation where search results are separated into categories, often including counts on those categories. The user can then select from those categories to restrict their search step by step.

He includes an example of what kind of results this sort of searching could return and how you can use the "facet.mincount" to restrict the results to an even finer set. There's a bit of code included showing how to use this filtering method with a combination of "addFilterQuery" and "createFacetField" calls before executing the select through Solarium.

0 comments voice your opinion now!
solr search solarium facet mincount tutorial


Bas De Nooijer's Blog:
Benchmarking PHP Solr response data handling
March 02, 2012 @ 09:08:03

On his blog Bas De Nooijer has put together some PHP Solr benchmarks around a few different ways to handle the response data.

Solr supports multiple output formats. Some are for general use (xml, json) and some are even language specific. If you're using PHP these are the most logical response writer formats: xml, json, phps (serialized php), php (php code to execute). On top of that PHP offers multiple ways to parse XML. I'm benchmarking these options to determine the most efficient decoding to implement in the next major version of Solarium, but the results should be useful for any PHP Solr implementation.

He includes a snippet of code he's using to generate the benchmarks, a PHPUnit test that pulls in two different json-based results and, for now, just runs a json_decode on it. You can see the results of his testing here, graphing out the different response handling methods and their time (in milliseconds) to parse the response. It's interesting to see that there's a direct relation to the size of the data set and how long it takes for the methods to execute.

The current code for his benchmarks is available over on github

0 comments voice your opinion now!
solr response handling solarium benchmark


Ibuildings techPortal:
DPC Radio Searching with Solr - Why, When, and How
October 05, 2011 @ 10:28:50

The Ibuildings techPortal ha sposted their latest episode in the DPC Radio podcast series - recordings of sessions from the Dutch PHP Conference earlier this year. This episode is a recording of a talk from Paul Matthews about "Searching with Solr".

With Google constantly pushing the customer expectations of searching, is it time to move away from our database full-text search in pursuit of a more targeted platform? Can implementing Solr offer more than an answer to a search? Implementing a search platform isn't always suitable for all applications, but in this talk we'll look at identifying the right search solution, choosing the best way to integrate it into our application and exploring all the benefits a search server can offer.

You can listen to this latest episode either through the in-page player, by downloading the mp3 or by subscribing to their feed. The slides for the presentation can be found here on SlideShare.

0 comments voice your opinion now!
dpcradio podcast dpc11 solr searching paulmatthews


DZone.com:
Solarium PHP Solr client
April 07, 2011 @ 10:09:31

New on DZone.com today there's an article from Bas De Nooijer talking about a new tool he's created to allow PHP to work directly with Solr (the popular searching platform from the Apache project) as a result of research he'd done from a previous article. The result is < href="https://github.com/basdenooijer/solarium">Solarium, an open sourced PHP client for Solr.

I've worked on a lot of Solr implementations in PHP applications. There are multiple solutions: manual HTTP requests, the solr-php-client library, custom implementations etcetera. However they all have one issue in common: they only handle the communication with Solr, many other important parts like query building are not covered at all. And the parts that are covered are usually over-simplified. [...] At first I developed it as a library for my own projects, but I've decided to turn it into an opensource project. The project is called 'Solarium' and can be found on github: https://github.com/basdenooijer/solarium

You can find complete details about the project over on its wiki including basics concepts of query flow and using the ping/select/update query methods to access your Solr server.

0 comments voice your opinion now!
solarium solr client github opensource search


Lukas Smith's Blog:
Transforming end user queries to Solr
July 01, 2010 @ 13:36:07

In some of his recent work Lukas Smith has been testing the waters of what Solr (the fast, open source search platform) has to offer. In his work with it he needed a way to convert the queries that come in from users into something Solr can understand. In this new post he explains how and shares the code for his solution (symfony-based).

In this blog post I want to talk about a prototype class I threw together (Look ma', I'm using git!) by working ezcSearch to help me in parsing and transforming end user queries into complex Solr queries.

He includes a few examples of Solr queries and what sort of data they'd return as well as the source for the library he's created to extend the sfSolrPlugin translate something coming in from a form into a simple Solr-formatted query.

0 comments voice your opinion now!
transform solr query tutorial symfony framework



Community Events





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


series project community podcast framework developer interview list introduction bugfix library api code release laravel application threedevsandamaybe language configure wordpress

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