Multiple Keywords in Building Search Engine

NerShitteerew

New Member
I am currently trying to build an internal search engine database using asp. I am no expert and have only been briefly introduced to this style of coding. The trouble I have been having is this:(e.g) I have two documents that are relatively the same and that have the same keywords to describe them. However, the keywords in the table are not written in the same order. All keywords written in the table are separated by spaces.Item 1 keywords: spare parts engine
Item 2 keywords: spare engine partsNow the code that I have would allow me to display items 1 and 2 if I was to input only ONE(1) of those key words: \[code\]sql = "Select title, descript, url, uid FROM searchMachine WHERE keywords LIKE '%" & Replace(keywords, "'", "''") & "%' ORDER BY uid;"\[/code\]However, if I was to type in the search box for "spare engine" then only item 2 will show and not item 1. Also, if I was to input "parts engine" or "engine parts" none of them will show. It seems to partake in only the first 2 (or pairs of 2) keywords listed. The goal I would like to accomplish is to allow grouped keywords that the user inputs (i.e. spare engine parts) and allow it to still display all relative info that has any of the keywords listed and not have to worry about writing pairs or groups of keywords over and over.I know there is a feature out there for full text-search, but I've researched that there have been instances of security breaches having that on, so I would like to avoid risking that. I have a feeling this may relate more to an AND or OR statement, but I'm unsure of the placement if it needs it. Does anyone have any expertise regarding this situation and would be willing to help? Please and thank you in advance.
 
Back
Top