/    Sign up×
Community /Pin to ProfileBookmark

Search engine for news articles

Hi guys

Ive recently organized my articles into a MYSQL database (they were just .html documents before)

So now I’ve done this, what’s the best way to build some sort of search box where users can search for news stories??

Thanks in advance

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@SrWebDeveloperOct 29.2010 — Using a CMS with a built in search tool? (If not, consider one from this excellent site)

If all you need is a search tool, consider Google Custom Search or FastFind. The first requires no real development, just setting up a Google account and following instructions on how to get Google to index your site, including an advanced option where you use a special script which generate an XML file Google can read and update if you want to control the index better. Google even has an Ajax front end if you wish. The latter is a fully featured back end indexer/front end search box generator complete with templates for customization. I can't supply the link due to a firewall issue here at work, just search for "php fastfind" in Google.

Two simple suggestions. If you want a proprietary search tool, i.e. one that queries your database directly (or via indexing) and is customized to work with that data set (i.e. search by very specific field types) then look into MySQL search engines, here is one . Use it to learn how MySQL does fulltext queries. This is intended to help you get started on a your own, if you opt to code it from scratch.

-jim
Copy linkTweet thisAlerts:
@NogDogOct 29.2010 — If you want to write your own search code, it will help if your articles are stored in a MyISAM table type and a "full text" index is defined for the columns you'll be searching on. Then you can use the [url=http://dev.mysql.com/doc/refman/5.1/en/fulltext-search.html]full text search functions[/url] to grab the data.
×

Success!

Help @jason87 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...