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

PHPBuilder.com:
Using Zend_Search_Lucene, the PHP Lucene Implementation
Jul 07, 2011 @ 17:43:32

On PHPBuilder.com today there's a new tutorial from Jason Gilmore about using the Zend_Search_Lucene component of the Zend Framework to index and search your data.

In this article I'll show you how to undertake the former approach using PHP's most prominent Lucene implementation, which also happens to be part of the Zend Framework: the Zend_Search_Lucene component.

After briefly introducing the Zend_Search_Lucene component he gets to a practical use - being able to search through submitted information on any and all fields quickly. He includes the code to insert the information into the Lucene data and how to search and retrieve it back out the other side. He also includes a brief example of indexing on a certain field to make it even faster.

tagged: zendsearchlucene lucene zendframework tutorial

Link:

Juozas Kaziukenas' Blog:
Starting with Zend_Search_Lucene
Mar 12, 2009 @ 17:09:56

Juozas Kaziukenas has a recent post to his blog introducing one of the many useful components of the Zend Framework - Zend_Search_Lucene.

As websites grows, searches like "LIKE title '%search term%'" becomes unreliable. There are very good solutions like Sphinx, Lucene, etc, but not surprisingly, you can't always have Sphinx installed (shared servers again) and other solutions should be chosen. [...] How you start indexing data? Zend manual has very good examples how to start with Lucene.

He includes some basic code to create an index for your data (his example pulls information from a database) and how to search that data for a string ('title:"Apple MacBook"' in his case, searching specifically on the title field in his index).

tagged: zendframework zendsearchlucene tutorial create index search database

Link:

Zend Developer Zone:
Implementing a Stemming Analyzer for Zend_Search_Lucene
Oct 22, 2008 @ 19:11:25

On the Zend Developer Zone today there's a new tutorial posted that shows how to use the Zend_Search_Lucene component of the Zend Framework to create a stemming analyzer.

The Zend implementation of Lucene provides a powerful tool set for those looking to implement a Google-like search for their PHP web application. One of the requirements in creating a Google-like search with Zend is the creation of a stemming, stop word filtering, lower-casing analyzer. This article will briefly discuss the basic role of an analyzer in the Lucene API, my implementation of a new "StandardAnalyzer" for the Zend_Search_Lucene component of the Zend Framework, the inner workings of this analyzer, and its basic usage.

It talks about the creation of an analyzer - a tool that splits out words, removes some of the most common and standardizes the contents (like making it all lowercase such as the StandardAnalyzer in Java's Lucene does). The author has come up with his own implementation in PHP and works through it, explaining how it works and where to put the data and language files it would need to pull from.

tagged: implement tutorial zendsearchlucene analyzer java lucene

Link:

Markus Wolff's Blog:
Fulltext search as a webservice
May 07, 2008 @ 17: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).

tagged: fulltext search xml document zendsearchlucene zendframework solr

Link:

Maarten Balliauw's Blog:
Indexing Word 2007 (docx) files with Zend_Search_Lucene
Feb 05, 2008 @ 16:24:00

Maarten Balliauw has written about a method he's developed to convince the Zend_Search_Lucene component of the Zend Framework to index the contents of a Word 2007 document.

Lucene basically is an indexing and search technology, providing an easy-to-use API to create any type of application that has to do with indexing and searching. If you provide the right methods to extract data from any type of document, Lucene can index it. [...] Sounds like a challenge!

He works through the three step process to getting the searching working, the key being his readDocXContents() function that goes through the Word file and returns all the text it can find. This is passed back out so the Zend Framework component can pull the data in and search (their example is on the string "Code Access Security").

You can grab the the full code here.

tagged: zendframework zendsearchlucene word document download

Link:

Kapustabrothers.com:
Indexing PDF Documents with Zend_Search_Lucene
Jan 23, 2008 @ 13:58:00

As mentioned on the Zend Developer Zone, there's a new post on kapustabrothers.com about a method for indexing all of those PDF files your site uses with the help of the Zend Framework's Zend_Search_Lucene component.

along with many others have been trying and asking how to index and search PDF files. Once Zend released its Framework, which is a port of Java Lucene to PHP, I decided to jump on board and find a way to index and search PDF files.

He uses the XPDF software to parse out the PDF files and the ZF component to do the actual indexing and searching. XPDF extracts key information from the PDF and puts it out to a new file where Zend_Search_Lucene can get to it. Example code is included to show the automatic creation of these details and how to add them to the component's index.

tagged: zendframework zendsearchlucene pdf index document tutorial

Link:

Rob Allen's Blog:
Luke - Lucene Index Toolbox
Sep 24, 2007 @ 12:57:00

Rob Allen quickly points out a tool that Lucene users (Zend Framework and otherwise) can use to check out the contents of their indexing files.

If you want to understand what's in your Zend_Search_Lucene index files, then download Luke (http://www.getopt.org/luke/) and point it at the directory containing your index files.

He also includes a screenshot to give you an idea of the interface.

Luke bills itself as: "a handy development and diagnostic tool, which accesses already existing Lucene indexes and allows you to display and modify their contents in several ways [including] view documents / copy to clipboard, selectively delete documents from the index and optimize indexes".

tagged: lucene toolbox search index zendframework zendsearchlucene lucene toolbox search index zendframework zendsearchlucene

Link:

Rob Allen's Blog:
Luke - Lucene Index Toolbox
Sep 24, 2007 @ 12:57:00

Rob Allen quickly points out a tool that Lucene users (Zend Framework and otherwise) can use to check out the contents of their indexing files.

If you want to understand what's in your Zend_Search_Lucene index files, then download Luke (http://www.getopt.org/luke/) and point it at the directory containing your index files.

He also includes a screenshot to give you an idea of the interface.

Luke bills itself as: "a handy development and diagnostic tool, which accesses already existing Lucene indexes and allows you to display and modify their contents in several ways [including] view documents / copy to clipboard, selectively delete documents from the index and optimize indexes".

tagged: lucene toolbox search index zendframework zendsearchlucene lucene toolbox search index zendframework zendsearchlucene

Link:


Trending Topics: