PHP Classes

Search by Relevance: Sort arrays or MySQL searches by relevance

Recommend this page to a friend!
  Info   View files View files (4)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 1,044 All time: 3,538 This week: 455Up
Version License PHP version Categories
search-by-relevance 1.0Free for non-comm...3.0Databases, Searching, Data types
Description 

Author

This class can be used to sort arrays or MySQL searches by relevance.

It can search for a string in an array of a MySQL query result.

The class returns an array of search result entries that is sorted by a criteria of relevance implemented within the class.

A number representing the relevance is returned within the sorted search results.

Innovation Award
PHP Programming Innovation award nominee
December 2010
Number 3


Prize: One downloadable e-book of choice by O'Reilly
Sometimes it is necessary to determine which entries in search results are more relevant to the original search terms.

This class provides an effective solution to sort an array of results according to which results contain text more similar to the original search terms.

Manuel Lemos
Picture of Carlson A. Soares
Name: Carlson A. Soares <contact>
Classes: 4 packages by
Country: Brazil Brazil
Age: 35
All time rank: 62045 in Brazil Brazil
Week rank: 270 Up19 in Brazil Brazil Up
Innovation award
Innovation award
Nominee: 2x

  Files folder image Files  
File Role Description
Accessible without login Plain text file est_cid.sql Data Sql file with the database used in the teste.php
Plain text file search.php Class Class to search in array
Plain text file search_mysql.php Class class to search in mysql resultset
Accessible without login Plain text file teste.php Example Script of exemple showing the class function

 Version Control Unique User Downloads Download Rankings  
 0%
Total:1,044
This week:0
All time:3,538
This week:455Up