Hi,
I wonder if anyone can suggest how i go about structuring this database and query please?
I have a search screen with multiple input field options which queries one table in a database by building a SELECT query from whichever fields were input. The problem i have is with the textual search. There is currently a text field so if the user inputs "vat" it searches a description column in the mySQL DB "where description LIKE %vat%". This is working fine.
However i need it to be intelligent to search for similar meanings e.g. if vat is input, also look for "%value added tax" in the description. There is a specific group of words i need this to work for not a full word dictionary. The idea i had was to build a separate 2 column table which has "vat" in one column and "value added tax" in another and query this table first to see if the word in the text field is present and then obtain its alternative meaning (column 2). Then with the result do "where description LIKE %vat% OR where description LIKE %value added tax%".
Is there a better or more standard way of doing this? I've read lots on using XML, metadata etc but nothing seems to nail it down specifically.
Many Thanks