-2

I'm working on an app for iOS and I asked this question. There's an answer which leads me to a whole bunch of posts related to something called "full text search". Based on the reading I've done, I can guess that it has something to do with searching an entire set of text some way as opposed to only searching keywords.

How does indexing speed up FTS, and why is it any more specific than keyword searching?

Community
  • 1
  • 1
Moshe
  • 57,511
  • 78
  • 272
  • 425

2 Answers2

2

It means exactly that - simply searching all the text in a document as opposed to keywords/metadata.

http://en.wikipedia.org/wiki/Full_text_search

Nacht
  • 3,342
  • 4
  • 26
  • 41
2

Keyword search searches for documents based on keywords that have been assigned to the document by some other means (a person or a program that analyzes and categorizes the document). Full text search searches the entire document for the words or phrases you're looking for.

Imagine that you're searching for information about steam trains. Keyword search would only locate documents that have been tagged with the keywords "steam" and "train". Full text search, on the other hand, looks for documents that contain the words "steam" and "train" somewhere in the text.

That's the basic difference. The Wikipedia article that Nacht posted is a good place to start on more detail.

Jim Mischel
  • 131,090
  • 20
  • 188
  • 351
  • So where does indexing come into play? – Moshe Dec 13 '11 at 02:10
  • It depends on the implementation, but let's consider that any block of text has word-delimiters and unnecessary characters, right? So let's assume we can remove all `[,.?!/\"'!@#$%^&*()]` yeah? So first parse all those out, then break on every space, then toLower on every word, and for each word in our source array, add the current position (you've parsed your way through this far, you can't figure out how to keep the rough position along the way?) to the array. Now, I'm sure you've seen at least four flaws so far, so keep those in mind. That's one form of indexing (jumping to a word). – jcolebrand Dec 13 '11 at 02:40
  • So really, "where does indexing come into play" the answer is "what are you indexing _for_?" – jcolebrand Dec 13 '11 at 02:41
  • 2
    As the Wikipedia article says, the purpose of indexing is to create an index that says where each word is in each document. It's much faster to search the index than it would be to search every document with every query. FTS is a rather involved topic--much more involved than we can cover here. I recommend reading the Wikipedia article and doing some searches for relevant information. The book "Managing Gigabytes," although dated now, has a rather good introduction as well as some solid detailed information. Also see http://en.wikipedia.org/wiki/Inverted_index – Jim Mischel Dec 13 '11 at 05:01