News Feed
Jobs Feed
Sections




News Archive
feed this:

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

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


Matt Williams' Blog:
High level search with PHP and Apache Solr
March 19, 2010 @ 12:34:18

Matt Williams has a quick post to his blog about using the combination of PHP and Apache's Solr to more powerful searching than something like a MySQL fulltext index can give you.

When data sets get large and MySQL database querying to search become too load heavy and slow, full indexing is required. Several solutions are available but in this article I will be demonstrating the Apache foundations Solr Java Lucene implementation. For this a Java build will be required. Linux or Mac is less of a problem but for windows I use the Apache Tomcat server.

He shows ho to use the Solr PHP interface to make the connection to the server, ping it to be sure the connection is working and, based on the schema and search information, return a set of results in a PHP object.

0 comments voice your opinion now!
apache solr interface tutorial


Zend Developer Zone:
Announcing the Apache Solr extension in PHP
October 05, 2009 @ 15:37:59

As announced on the Zend Developer Zone today, there's a new version of the extension for PHP that lets it interface directly with a Solr instance.

The Apache Solr extension is an extremely fast, light-weight, feature-rich library that allows PHP developers to communicate easily and efficiently with Apache Solr server instances using an object-oriented API. It effectively simplifies the process of interacting with Apache Solr using PHP. The Solr extension already has built-in readiness for Solr 1.4

The post lists some of the features of the API the extension exposes (like connection reuse and a simpler interface to response data) as well as a list of supported components.

0 comments voice your opinion now!
apache solr extension api component


Markus Wolff's Blog:
Fulltext search as a webservice
May 07, 2008 @ 12:57:47

In a recent blog entry about a fulltext searching solution, Markus Wolff hacked together in a few hours with Zend_Search_Lucene:

While working at some really old code that provided a fulltext search feature, I was at one point incredibly pissed rather unsatisfied due to the fact that said code resisted all attempts to debug it. This lead to the decision to sit down on a rainy weekend to try if I couldn't come up with something more useful, and most importantly, scalable.

His method allowed for separation between the indexing and the main app and how he changes some of his methods when he learned that Solr did something very similar. He also lays out some example XML content and how it's handled in his script (via a SimpleXML object).

0 comments voice your opinion now!
fulltext search xml document zendsearchlucene zendframework solr


Community News:
Forage - A Search Abstraction Layer
February 08, 2008 @ 11:16:00

A different sort of abstraction layer project has been started up and has already seen a few releases - Forage. As mentioned on Rob Young's blog:

Recently I've been working on a search abstraction library for PHP called Forage. The idea is to bring to search what we've had for relational databases for quite a while, abstraction.

On Friday I put up a preview release with three backends; Solr, Xapian and Zend Search Lucene. At the moment it has the bare minimum of features but there will be more soon. In this post I'm going to talk a little about the motivation for the project and then walk through a short example.

He talks about the need for search abstraction (integration and resilience to change) before getting into an example of some code that grabs the data from an RSS feed, passes it in to the Xapian search engine and stores it before looking it over for thier search terms ("yahoo microsoft").

You can download the library if you'd like to try it out for yourself.

0 comments voice your opinion now!
search abstraction layer project xapian zendlucene solr



Community Events











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


opinion application release unittest component language series hack package introduction podcast dependency symfony2 hhvm composer security overview facebook framework install

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