Hello.
The other day, I was using a very popular search engine and like always, I white a couple of words into the text box and instantly received a couple of hundred answers.
Then I continue working on one of my project. It’s for a chemical company, and one of the requirements is to be able to search parts of a chemical name inside a 100,000 bank of name. They never search the entire word exactly, but a word of two. For example, if they white ACID in the textbox, the result is
The quick and dirty line of code to do that is the same I use for decades:
The result came from an indexed table on a network, and took about 10 to 20 seconds to finish. My question is: is it possible to achieve in VFP something like popular search engines?
My poor result is based on 100,000 records, but these engines search over gazillions records. I can’t use any soundex() or algorithm that transform the whole field. It has to search for one particular word in a string.
Thanks in advance
Nro
The other day, I was using a very popular search engine and like always, I white a couple of words into the text box and instantly received a couple of hundred answers.
Then I continue working on one of my project. It’s for a chemical company, and one of the requirements is to be able to search parts of a chemical name inside a 100,000 bank of name. They never search the entire word exactly, but a word of two. For example, if they white ACID in the textbox, the result is
Chromic Acid Flakes
Chromic Acid Flakes
Fluoboric Acid
Sulfuric Acid 1.800 Tech
The quick and dirty line of code to do that is the same I use for decades:
Code:
SELECT pro_name FROM pro_pro1 WHERE "acid" $ LOWER(pro_name) INTO TABLE ttRes
The result came from an indexed table on a network, and took about 10 to 20 seconds to finish. My question is: is it possible to achieve in VFP something like popular search engines?
My poor result is based on 100,000 records, but these engines search over gazillions records. I can’t use any soundex() or algorithm that transform the whole field. It has to search for one particular word in a string.
Thanks in advance
Nro