The first thing to do is define what the inurl: indicates. I played with the idea of using inurl: to indicate a specific table that should be queried with iFTS, so in AdventureWorks you might have something like this:
Of course if might make more sense to give your inurl: a friendly name that maps to a database table:
You don't have to go with this, but I couldn't think of what else the inurl: would be useful for. Download the sample code from the Irony site and change these lines:
BinaryOp.Rule = ImpliedAnd | "and" | "&" | "-" | "or" | "|" | ":"; /* Change line 41 */
RegisterOperators(30, ":"); /* Insert this between lines 58 and 60 */
This will create a new ":" BinaryOperator with higher precedence than AND and OR. When you run the GrammarExplorer on it you'll see it's captured as a BinaryExpression like this:
|---: (Key symbol)
You'll need to add the handling for the new BinaryExpression in the ConvertQuery function around line 113 or so. If you decide to use inurl: to select a table to query the tricky part would be that FTS doesn't support querying multiple tables
at once, so you'd have to build out individual iFTS queries for each table and UNION them together when you run them against the server. This added complexity is the main reason I didn't add this functionality to the original search query grammar.
Basically you'll have to build and keep track of multiple iFTS query strings simultaneously and then pull them all together at some point. You also have to decide what it means to retrieve results of a search like this:
address:oak AND product:crankarm
In this example there's no direct relationship between the two tables being queried (although you could probably use some indirect relationship through customer orders, for instance, to bring together addresses and products -- but does that make sense for
your application?) Of course you may not want to use the inurl: to direct iFTS to search a table (you may have another purpose for it), so that may not be a concern for you.