I have a search box where users can enter text, when they hit search the text they entered will then be used in a SQL CONTAINSTABLE
statement. I need to parse the string so that it is in an appropriate format for the CONTAINSTABLE
function, and I have found an example that uses Irony that almost does exactly what I need. I got the Irony sample class here:
which is actually designed for the SQL CONTAINS function but the difference between that and CONTAINSTABLE
aren't a problem for me at the minute. I made a slight modification in that I didn't want the 'Inflectional' behaviour, so I changed any references of that to be 'Exact'.
The problem I am having now is that I want a search phrase to be treated as a phrase, rather than as a list of keywords separated by an AND
operator. So for example, if a user enters: "General manager", then I want it to come through the parser as "General manager" but it's currently bringing back "General" AND "manager"
I think I need to modify the constructor somehow, where it is building all the expression rules - but I'm not even sure where to start on that!
Any help greatly appreciated, thanks.