"Full Text Search" algorithms?

Not open for further replies.


Registered Member
Hi all of you geeks out there,

I'm need an efficient way to search a large amount of English text (plain text) for a given word (or set of words). I am searching for a code snippet or an algorithm. I found none. I couldn't even find any material to describe such methods or algorithms.

If anyone can provide a link to some site or anything, that would be of great help.

For what operating system, and what type of project?
It don't matter. My OS is WinXP. I write code in VC++, VB, C#, you name it! I just need an idea better than comparing sequentially every word in the text to the word(s) I'm trying to locate. You know, something like indexing or ...? Thanx :)
I was just thinking that Grep probably does most of what you want to do. Grep and WC and a few other Unix tools.
I'll have a look at those. Although, I don't think Grep is much of use. I think it does the same simple search!
No. Adam is right. grep is the best way. You can search multiple documents for any text string you like.
Thanx prozak for understanding me and not suggesting a utitlity.

I'd love to find an algorithm. But, a source code will be great too.

Thanx again. :)
Cool, maybe i'm useful in some limited context. Here's what a quick search found:

There are several search utilities/engines with source code on this page:


And from that, this looks like the most complete example of the whole nine yards:


I'm a little bit fried from looking at computer screens right now, but a quick glance suggests someone with more diligence than I will find something at one of the two sources above... sorry this is vague. With more energy I will do more tomorrow if needed and possible.
most programming languages have a grep facility, why not use that?

Its easier.

(Unless you are trying to pass off someone elses algorithm as your own of course...)
Not open for further replies.