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

php|architect:
Full-text Search with SQLite
November 15, 2011 @ 09:53:50

On the php|architect site there's a recent tutorial from Jeremy Kendall about full-text searching in SQLite, a lightweight database alternative that, since it's stored locally, can be used without a full database server.

Full-text search with SQLite is so ridiculously easy to implement, there are only two valid reasons you haven't done it yet. The first is you don't need the full-text capability, and the second is you didn't know it could be done.

In his method he creates a full-text search table (using fts4) and populating it with your data. You can use the "MATCH" keyword in your SQL to find the closest matches and even handy modifiers like "NEARBY", wildcards and token/prefixes in queries. For more detailed information, check out the SQLite documentation for a full guide.

0 comments voice your opinion now!
fulltext sqlite search fts4 table


DZone.com:
MySQL PHP search four-part video tutorial series
October 31, 2011 @ 13:09:29

As linked to on DZone.com today, there's a video series about PHP/MySQL and creating a basic search engine from Adam Khoury's collection:

Fresh from Adam Khoury's massive library of instructional videos comes a four-part, full-fledged tutorial on searching a MySQL database using PHP. The tutorials use the 'worked example' format (like Khan Academy), which makes learning relatively painless for newbies and not completely useless for more experienced developers.

The four videos require you to have at least a decent working knowledge of putting PHP and MySQL together and show you how to:

0 comments voice your opinion now!
video tutorial series search union like fulltext mysql searchengine


Content with Style:
Fulltext searches with Xapian and PHP
November 04, 2009 @ 08:19:13

New on the Content with Style blog today there's this tutorial looking at full-text searching combining Xapian and PHP to replace the slower full-text methods in something like a MySQL database.

Sometimes MySQL just isn't quick enough. Especially when it comes to fulltext searches. Everything needs to be indexed correctly, and if we're using different fields with different weights for a relevance percentage, things get very complicated quickly. Xapian to the rescue.

The Xapian library can be compiled and installed as a binding for your PHP installation. He includes some sample scripts to get you started - the SQL to build the table, a Xapian wrapper class, and three simple PHP scripts to search for, view and delete records. Some sample results are also included.

0 comments voice your opinion now!
fulltext search xapian mysql database tutorial


PHPFreaks.com:
Simple SQL Search
May 08, 2009 @ 09:30:06

In a new article on PHPFreaks.com Brad Jacobs takes a look at creating a simple search of the information in your database. Their example will search a table containing article information (title, story content, etc).

The aim of this tutorial is to provide users with a basic layout and the logic behind creating a multiple field search in MySQL. As often time users tend to over do the search and add a lot of unnecessary code. By following and understanding this tutorial you should be able to implement this search into your own site and provide a nice and simple SQL Search of your own database. So roll up your sleeves and be prepared to get dirty.

Everything's provided for you - the SQL to build and fill the tables and the code to perform the search. They opted to go with LIKE statements in the where clause instead of using something like full-text searching. The former works for a lot of situations, but can get slower and slower the more rows there are in the table.

0 comments voice your opinion now!
simple tutorial sql search mysql fulltext article content title


Antony Dovgal's Blog:
PECL/sphinx - fast fulltext search made easy
July 31, 2008 @ 15:14:08

Antony Dovgal has a quick post today about a PECL extension that makes for quick and easy full-text searching on standard SQL databases.

As some of you might have noticed, I've been a bit busy lately creating new PECL extension - sphinx. The extension provides an interface to a feature-rich fulltext search engine Sphinx written by Andrew Aksyonoff. We (Andrew and me) made our best to keep the extension as compatible to the pure-PHP API (shipped with Sphinx) as possible in order to make the transition easier.

The PECL page has already been created as well as a page in the manual for how it works. He also briefly mentions the installation (including teh required libraries).

0 comments voice your opinion now!
pecl sphinx fulltext search sql extension install


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


DevShed:
Performing Full-text and Boolean Searches with MySQL
June 06, 2007 @ 14:06:00

DevShed has started a new MySQL-centric series today with this new tutorial, an initial look at working with MySQL and PHP to perform full-text and boolean searches on your data.

In this series of articles I'm going to show you how to work with full-text and Boolean searches using MySQL and PHP 5, but the entirety of the code samples that will be developed here can be easily modified to work with a different database server.

They start with the creation of a "common approach" for making the requests and fetching the results (in classes so that any other database could be substituted). With the class structure in place, they move on to the full-text searches, showing how to format database tables by creating them with a fulltext index on which ever fields you want.

0 comments voice your opinion now!
mysql boolean search fulltext table database tutorial mysql boolean search fulltext table database tutorial


Developer.com:
Creating a Code Search Engine with PHP and MySQL
April 12, 2007 @ 09:30:00

Developer.com has posted a new tutorial by Jason Gilmore about the creation of a simple search engine based around a MySQL database and using PHP to perform the queries.

In this article I'll offer a simplified version of this search engine, introducing you to some compelling PHP and MySQL features along the way. You might adopt what you learn towards building your own search engine, or towards other applications.

He starts with the base of the application - the database schema (including loading data into it) - and works up from there. He opts to go with the fulltext search type as it can provide a huge performance boost over just using something like LIKE statements in your query. He also includes a bit of HTML for help make the output easier to use.

1 comment voice your opinion now!
searchengine mysql fulltext html schema searchengine mysql fulltext html schema


roScripts.com:
PHP search engine
March 30, 2007 @ 09:55:00

The roScripts website has a new tutorial that anyone just starting out to create a search engine with PHP and MySQL should get their hands...er eyes on. It steps through the creation of a simple PHP-based search engine, showing multiple methods to achieve the goal.

The right search engine on your website won't bring you more traffic but it will help your visitors to better locate things so it will keep them on your pages. A good search engine implemented can increase your hits with almost 30% and this is tested. I'm not talking just to have a tutorial.

The different methods the show how to implement include:

  • using a straight LIKE on each word entered
  • paring down those results using ORs on other columns too
  • implementing the Porter Stemmer algorithm
  • finding matches that contain the term but not only one part of it
  • Full-text searches

It's a good overview of some of the basic steps to getting your own search up and running, but some of them, when applied to sites with larger amounts of data behind them, wouldn't be useful at all (slowness mainly).

0 comments voice your opinion now!
searchengine like fulltext match porterstemmer searchengine like fulltext match porterstemmer


Wolfgang Drews' Blog:
Some thoughts on indexes & searching in MySQL / PHP
June 05, 2006 @ 06:03:05

Giving your users a tool to find relevant invormation from the vast ocean that is the content of your site isn't easy sometimes. Even with the powerful combination of PHP and MySQL, it can be difficult to find what you're looking for. Wolfgang Drews shares in some of this frustration in his new blog post.

Using MySQL most of you will be familiar with this: searching in textfields for keywords is quite uncomfortable when using other table handler then MyISAM. If you use MyISAM, you can utilise the Fulltext-Search with MATCH AGAINST. Otherwise you are thrown back to "simple" string comparison functions (LIKE). Not really satisfying. As this won't change with the 5.1er Version of MySQL, i have to search for another solution.

His other suggestions include the use of two other tables (terms in one, references back to content in another) or an external search option, such as the Zend Framework's implementation of the lucene functionality - Zend_Search.

1 comment voice your opinion now!
search mysql fulltext like lucene zend framework search mysql fulltext like lucene zend framework



Community Events





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


podcast laravel deployment tips zendserver library language release introduction framework unittest update interview series package api community install symfony opinion

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