Question about Google-like query syntax converter

Oct 7, 2008 at 3:35 PM
There is description of Google like Full-Text query.

But one thing  is not good:

I tested code and found one problem.
If I entered phrase:

president -aluminium

it wokrs fine.

If phrase is:
-aluminium president

it generates syntax error, phrase cannot start from negation. I checked goole it understand correctly this kind of phrases.

Naturally query should not depend on order, i.e. A OR B == B OR A
Is it possible to describe this type of equivalence using Irony?

Oct 7, 2008 at 3:53 PM


Michael (the author) consulted me when preparing the article, and this problem surfaced at the time. The reason is the limitation of SQL server query syntax - it does not allow NOT in front of the query. Here is an extract from  his email:

...the issue is the - at the beginning of a phrase.  Like this:
-"Fish and chips"
Converts to:
NOT “Fish and chips”
Which is an illegal construct in SQL Server.   

In the end, he had to disallow leading minus in input grammar. This is one of the differences with Google syntax, he probably forgot to mention it in his article. You should contact the author directly I think, or post question with the article

Oct 7, 2008 at 5:20 PM
Ok, thank you very much.