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    
Last Updated Ratings Unique User Downloads Download Rankings
2010-11-22 (9 years ago) RSS 2.0 feedNot enough user ratingsTotal: 1,037 All time: 3,505 This week: 370Up
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
Name: Carlson A. Soares <contact>
Classes: 4 packages by
Country: Brazil Brazil
Age: 31
All time rank: 61945 in Brazil Brazil
Week rank: 795 Down62 in Brazil Brazil Down
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  
This week:0
All time:3,505
This week:370Up