[Info-vax] Looking for some text search ideas

David Froble davef at tsoft-inc.com
Fri Sep 26 18:40:15 EDT 2014


Michael Moroney wrote:
> Bill Pedersen <pedersen at ccsscorp.com> writes:
> 
>> A recent example was to search only for the leading letter of the 
>> string.  On match then check the character at the position of the last 
>> letter in desired srting for a match, if not match continue with 
>> comparison search for first letter of string at position after the last 
>> letter failed.  This has been shown to speed up the searches.
> 
> I've seen that search, not quite like that but the location and value of
> the mismatch determined how many characters to skip.  More efficient with
> long search strings.  I believe NOTES uses that algorithm.
> 
> Anyway, to the OP, does the value being search appear anywhere or only
> as a portion of a key (your "head gasket" example) ?  If only in the key,
> can you make a parallel file with only the keys and search that smaller 
> file?

Applications are written in Basic.  The InStr() function does a decent 
job searching for a sub-string within a string.

At this time, the person doing the implementation has decided that the 
capability is required in only one service.  He has set up an array to 
hold the relevant data, Description, Part #, and Mfg code.  The array 
will be loaded upon program start-up.  For now, it's just a straight 
search through the elements of the array, and producing a list of all 
matches.  Does the job.

My best advice was to make the search a service, socket connection, 
search the data, return the list of matches.  My thought was, if you 
find it useful in one place, sooner or later you'll probably find it 
useful in another place.



More information about the Info-vax mailing list