Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- FAST TEXT SEARCH for Clipper v.2.0 - <b>additional restrictions - refinements</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
   Additional Restrictions  - Refinements

   It is important to note that even with a verify process the CFTS 
   subroutines have been designed to retrieve records very quickly. In 
   fact, a large variety of post-search operations can be completed in 
   less time than it would take to do a conventional sequential search.

   Another verification type that might be created is a proximity    
   search for two strings within text records. After a text record passes 
   a CftsVeri() type 3 verification confirming the presence of both 
   strings, the number of characters between search strings could be 
   counted and compared to a user established maximum.

   CFTS does not contain a Previous function. This feature can be 
   implemented by saving the results of a search; that is, saving the 
   numbers returned by CftsNext() and verified by CftsVeri() in an array, 
   a temporary file, or a subindex or by copying the actual records to a 
   new .DBF file. Several third party products, such as Moon 
   Microsystems' iQuery, can create subindexes which are like Clipper's 
   .NTX files but contain only selected records. 

   In a somewhat similar way, logical OR and NOT type searches can be 
   made. In the case of OR, the saved results of a search for a 
   particular string(s) would be combined with the results of another 
   search. The resulting list of numbers, after eliminating duplicates, 
   would represent all text records containing either of the two strings.

   The NOT case can be implemented using the verify process. First use 
   CftsSet(), CftsNext() and CftsVeri() to find records containing the 
   first term. then search each of these records, again using CftsVeri(), 
   for the occurrence of the second, unwanted term, rejecting those 
   records containing it.

   It is also possible, using CftsVeri(), to limit a search to a portion 
   of a text record. For example, if an .IA index was built based on all 
   fields of a data file, you can limit a search to a particular field by 
   supplying only that field to CftsVeri() rather than supplying the 
   entire source text record. Only records containing the search 
   string(s) in that field will pass the verification.

   Searches can be limited to a range of records by testing the return 
   values of CftsNext() against a desired range of record numbers. For 
   example, if you were to build an application based on the text of the 
   Bible, you might want to limit a search to a particular book. By 
   knowing that the Book of John was made up of records 300 through 400, 
   you could ignore any CftsNext() return value outside of that range. It 
   would be important to exclude these values before the verification 
   stage. In fact, you should always attempt to reduce the number of 
   records needing verification.


See Also: CftsVeri() Third Party Products

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson