Progress
Database Design
Guide


Indexing by Paragraph

Instead of indexing each line of text, you might want to index by paragraph. The method to use is similar to that for line indexing, but the text from a paragraph can be much longer. Therefore, instead of defining the field line_text, define an array field paragraph_text. If the longest paragraph is about 600 characters, specify 10 as the extent of paragraph_text.

When reading the document into the database, break each paragraph into units of about 60 characters and assign each to a member of the paragraph_text array. Note that you must break the text at a space or other word delimiter. Do not break the text in the middle of a word, because that causes the two fragments of the word to be indexed as two words.

You can use the index by paragraphs in the same way you use an index by lines. You can also index by chapter, by page, and so forth.


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095