You are here: RE: [PHP] searching and sorting « PHP « IT news, forums, messages
RE: [PHP] searching and sorting

Posted by Michael Sims on 01/19/05 04:58

Richard Lynch wrote:
> Brian A. Anderson wrote:
[...]
>> I am thinking of incrementally adding the resultant hits into two
>> associative arrays with the link to the data and a calculated
>> relevance value, and sorting this array by these relevences.
[...]
> One Axiom: Keep as much of the scoring/sorting in your SQL as
> possible -- That's what SQL engines are best at.

I suggest the original poster look into some of the full text indexing
capabilities of his SQL server. A lot of these (for PostgreSQL and MySQL
anyway) will automatically return a relevance value and handle sorting based
on that. As you said, that'll be a heck of a lot more efficient and easier
to implement that doing it in PHP.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация