You are here: Site search script? « All PHP « IT news, forums, messages
Site search script?

Posted by Wally on 04/13/06 02:30

I'm looking for a script which will search a set of text files and return
portions of text showing search keys in context (a few lines of text either
side, say). The text files are books and short stories, mostly about 50KB
each with a few around 300KB, and is a fixed set of (out of copyright) works
totalling 3.5MB. The user may want to search individual files, groups of
files, or the entire set.

I don't want to use MySQL, but I would like search results to come up
quickly. There's a potential for the site to become rather popular (within
its interest area).

I'd also like to add some sort of tagging system, where I can insert tags in
the text to pinpoint various concepts, like characters in the stories,
places, objects etc. Not just proper nouns, though - more general-purpose
than that. These would be selected by clicking normal hyperlinks and produce
lists for the user to peruse (the idea is to provide a comprehensive
cross-indexed reference for readers of the stories). Since this aspect could
go in almost any direction, and could be subject to change whenever I think
of a new concept to tag (and because I'd prefer it to be self-contained in
any case), I'd rather not use an external method like linking to the Google
API.

I've trawled HotScripts and PHPClasses, but haven't had much luck finding
something basic and functional that I can build on. I could write something
to search for matches and pull out suitably sized chunks of text, but I'm
concerned that searches of the full dataset might cause too much server
load. I'm assuming that generating some sort of static index (generated
locally and uploaded to the host server) would get around this, but I'm not
sure how to approach that, hence the trawl for something ready-made.

It's likely that a large proportion of searches will on the whole dataset -
do I really need to use some kind of index, or is 3.5 megs of plain text
with tags okay? If I do need an index, could anyone recommend a script that
could be used as a starting point? Failing that, how about some tutorial
type stuff where I could learn more about indexing?

Cheers,


--
Wally
www.wally.myby.co.uk

 

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

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