Repost: Checking for error: "A clause of the query contained only ignored words"

Repost: Checking for error: "A clause of the query contained only ignored words"

Post by Thomas Kejse » Tue, 20 May 2003 11:14:14



I have an application that runs a stored procedure somewhat liks this
against a table:


AS

SELECT * FROM T1

My problem is that if a user issues this call:

spSearch 'a*'

I get the following error:

"A clause of the query contained only ignored words"

which is off course the natural behaviour of the freetext engine. What I
would like to do is to check if the error occurs before running the select,
i.e. something like:


AS


    <<Do an alternate search>>
END ELSE
BEGIN
    SELECT * FROM T1

END

I can't seem to find a function that can check for this... Any help
appreciated

Sincerely
Thomas Kejser

 
 
 

Repost: Checking for error: "A clause of the query contained only ignored words"

Post by Jacco Schalkwij » Tue, 20 May 2003 15:24:26


Try reposting in the microsoft.public.sqlserver.fulltext newsgroup, although
that is not very busy and you might have to wait a few days for an answer.

--
Jacco Schalkwijk MCDBA, MCSD, MCSE
Database Administrator
Eurostop Ltd.


> I have an application that runs a stored procedure somewhat liks this
> against a table:

> CREATE PROCEDURE spSearch

> AS

> SELECT * FROM T1

> My problem is that if a user issues this call:

> spSearch 'a*'

> I get the following error:

> "A clause of the query contained only ignored words"

> which is off course the natural behaviour of the freetext engine. What I
> would like to do is to check if the error occurs before running the
select,
> i.e. something like:

> CREATE PROCEDURE spSearch

> AS


>     <<Do an alternate search>>
> END ELSE
> BEGIN
>     SELECT * FROM T1

> END

> I can't seem to find a function that can check for this... Any help
> appreciated

> Sincerely
> Thomas Kejser


 
 
 

Repost: Checking for error: "A clause of the query contained only ignored words"

Post by John Kan » Tue, 20 May 2003 19:22:46


Thomas,
Yes, search the  microsoft.public.sqlserver.fulltext newsgroup for an answer
to this "problem". There are two current solutions, one is KB 246800
(Q246800) "INF: Correctly Parsing Quotation Marks in FTS Queries"
http://support.microsoft.com//default.aspx?scid=kb;EN-US;246800 and the
other is to put the noise words in a client-side html search page, see posts
that reference SearchPage.htm

Regards,
John
PS: Jacco, the microsoft.public.sqlserver.fulltext has a very fast response
time to posts, IMHO.


> Try reposting in the microsoft.public.sqlserver.fulltext newsgroup,
although
> that is not very busy and you might have to wait a few days for an answer.

> --
> Jacco Schalkwijk MCDBA, MCSD, MCSE
> Database Administrator
> Eurostop Ltd.



> > I have an application that runs a stored procedure somewhat liks this
> > against a table:

> > CREATE PROCEDURE spSearch

> > AS

> > SELECT * FROM T1

> > My problem is that if a user issues this call:

> > spSearch 'a*'

> > I get the following error:

> > "A clause of the query contained only ignored words"

> > which is off course the natural behaviour of the freetext engine. What I
> > would like to do is to check if the error occurs before running the
> select,
> > i.e. something like:

> > CREATE PROCEDURE spSearch

> > AS


> >     <<Do an alternate search>>
> > END ELSE
> > BEGIN
> >     SELECT * FROM T1

> > END

> > I can't seem to find a function that can check for this... Any help
> > appreciated

> > Sincerely
> > Thomas Kejser

 
 
 

Repost: Checking for error: "A clause of the query contained only ignored words"

Post by Jacco Schalkwij » Tue, 20 May 2003 21:20:37


Quote:> PS: Jacco, the microsoft.public.sqlserver.fulltext has a very fast
response
> time to posts, IMHO.

Good to hear that. I know some newsgroups basically have one resident
expert, and when s/he is away you're more or less out of luck :-)


> Thomas,
> Yes, search the  microsoft.public.sqlserver.fulltext newsgroup for an
answer
> to this "problem". There are two current solutions, one is KB 246800
> (Q246800) "INF: Correctly Parsing Quotation Marks in FTS Queries"
> http://support.microsoft.com//default.aspx?scid=kb;EN-US;246800 and the
> other is to put the noise words in a client-side html search page, see
posts
> that reference SearchPage.htm

> Regards,
> John
> PS: Jacco, the microsoft.public.sqlserver.fulltext has a very fast
response
> time to posts, IMHO.



> > Try reposting in the microsoft.public.sqlserver.fulltext newsgroup,
> although
> > that is not very busy and you might have to wait a few days for an
answer.

> > --
> > Jacco Schalkwijk MCDBA, MCSD, MCSE
> > Database Administrator
> > Eurostop Ltd.



> > > I have an application that runs a stored procedure somewhat liks this
> > > against a table:

> > > CREATE PROCEDURE spSearch

> > > AS

> > > SELECT * FROM T1

> > > My problem is that if a user issues this call:

> > > spSearch 'a*'

> > > I get the following error:

> > > "A clause of the query contained only ignored words"

> > > which is off course the natural behaviour of the freetext engine. What
I
> > > would like to do is to check if the error occurs before running the
> > select,
> > > i.e. something like:

> > > CREATE PROCEDURE spSearch

> > > AS


> > >     <<Do an alternate search>>
> > > END ELSE
> > > BEGIN
> > >     SELECT * FROM T1

> > > END

> > > I can't seem to find a function that can check for this... Any help
> > > appreciated

> > > Sincerely
> > > Thomas Kejser

 
 
 

Repost: Checking for error: "A clause of the query contained only ignored words"

Post by Thomas Kejse » Wed, 21 May 2003 09:42:04


Thanks for the answers

Too bad there seems to be no way of checking it inside the stored procedure.

procedure ends execution when the error occurs :-( This seems strange since
the "a clause of the..." is only a severity 16 error, which should allow me
to continue execution.

This SHOULD work (but doesn't)

SELECT * FROM testtable WHERE Freetext(FreetextColumn, 'a')


    PRINT 'trapped the error'
END

Any clues of why SQL server does not allow me to check on the error variable
after the freetext error?

Yours sincerely
Thomas Kejser


> > PS: Jacco, the microsoft.public.sqlserver.fulltext has a very fast
> response
> > time to posts, IMHO.

> Good to hear that. I know some newsgroups basically have one resident
> expert, and when s/he is away you're more or less out of luck :-)



> > Thomas,
> > Yes, search the  microsoft.public.sqlserver.fulltext newsgroup for an
> answer
> > to this "problem". There are two current solutions, one is KB 246800
> > (Q246800) "INF: Correctly Parsing Quotation Marks in FTS Queries"
> > http://support.microsoft.com//default.aspx?scid=kb;EN-US;246800 and the
> > other is to put the noise words in a client-side html search page, see
> posts
> > that reference SearchPage.htm

> > Regards,
> > John
> > PS: Jacco, the microsoft.public.sqlserver.fulltext has a very fast
> response
> > time to posts, IMHO.



> > > Try reposting in the microsoft.public.sqlserver.fulltext newsgroup,
> > although
> > > that is not very busy and you might have to wait a few days for an
> answer.

> > > --
> > > Jacco Schalkwijk MCDBA, MCSD, MCSE
> > > Database Administrator
> > > Eurostop Ltd.



> > > > I have an application that runs a stored procedure somewhat liks
this
> > > > against a table:

> > > > CREATE PROCEDURE spSearch

> > > > AS

> > > > SELECT * FROM T1

> > > > My problem is that if a user issues this call:

> > > > spSearch 'a*'

> > > > I get the following error:

> > > > "A clause of the query contained only ignored words"

> > > > which is off course the natural behaviour of the freetext engine.
What
> I
> > > > would like to do is to check if the error occurs before running the
> > > select,
> > > > i.e. something like:

> > > > CREATE PROCEDURE spSearch

> > > > AS


> > > >     <<Do an alternate search>>
> > > > END ELSE
> > > > BEGIN
> > > >     SELECT * FROM T1

> > > > END

> > > > I can't seem to find a function that can check for this... Any help
> > > > appreciated

> > > > Sincerely
> > > > Thomas Kejser

 
 
 

Repost: Checking for error: "A clause of the query contained only ignored words"

Post by Jacco Schalkwij » Wed, 21 May 2003 10:51:32


Well, the problem is that the severiy levels are not well defined, something
I sincerely hope has been addressed by MS in Yukon. Some severity 16 error
will allow you to handle them, some lower level error will abort the batch.
I guess it this case the stored procedure is aborted because Full Text
doesn't use SQL Server itself, but Index Server as a kind of imlicit linked
server, and the errors are treated along the lines of linked server errors,
where _every_ error terminates the batch. Can't say that thing have been
implemented very neatly, but I guess we have to put up with it.

--
Jacco Schalkwijk MCDBA, MCSD, MCSE
Database Administrator
Eurostop Ltd.


> Thanks for the answers

> Too bad there seems to be no way of checking it inside the stored
procedure.

> procedure ends execution when the error occurs :-( This seems strange
since
> the "a clause of the..." is only a severity 16 error, which should allow
me
> to continue execution.

> This SHOULD work (but doesn't)

> SELECT * FROM testtable WHERE Freetext(FreetextColumn, 'a')


>     PRINT 'trapped the error'
> END

> Any clues of why SQL server does not allow me to check on the error
variable
> after the freetext error?

> Yours sincerely
> Thomas Kejser



> > > PS: Jacco, the microsoft.public.sqlserver.fulltext has a very fast
> > response
> > > time to posts, IMHO.

> > Good to hear that. I know some newsgroups basically have one resident
> > expert, and when s/he is away you're more or less out of luck :-)



> > > Thomas,
> > > Yes, search the  microsoft.public.sqlserver.fulltext newsgroup for an
> > answer
> > > to this "problem". There are two current solutions, one is KB 246800
> > > (Q246800) "INF: Correctly Parsing Quotation Marks in FTS Queries"
> > > http://support.microsoft.com//default.aspx?scid=kb;EN-US;246800 and
the
> > > other is to put the noise words in a client-side html search page, see
> > posts
> > > that reference SearchPage.htm

> > > Regards,
> > > John
> > > PS: Jacco, the microsoft.public.sqlserver.fulltext has a very fast
> > response
> > > time to posts, IMHO.



> > > > Try reposting in the microsoft.public.sqlserver.fulltext newsgroup,
> > > although
> > > > that is not very busy and you might have to wait a few days for an
> > answer.

> > > > --
> > > > Jacco Schalkwijk MCDBA, MCSD, MCSE
> > > > Database Administrator
> > > > Eurostop Ltd.



> > > > > I have an application that runs a stored procedure somewhat liks
> this
> > > > > against a table:

> > > > > CREATE PROCEDURE spSearch

> > > > > AS

> > > > > SELECT * FROM T1

> > > > > My problem is that if a user issues this call:

> > > > > spSearch 'a*'

> > > > > I get the following error:

> > > > > "A clause of the query contained only ignored words"

> > > > > which is off course the natural behaviour of the freetext engine.
> What
> > I
> > > > > would like to do is to check if the error occurs before running
the
> > > > select,
> > > > > i.e. something like:

> > > > > CREATE PROCEDURE spSearch

> > > > > AS


> > > > >     <<Do an alternate search>>
> > > > > END ELSE
> > > > > BEGIN
> > > > >     SELECT * FROM T1

> > > > > END

> > > > > I can't seem to find a function that can check for this... Any
help
> > > > > appreciated

> > > > > Sincerely
> > > > > Thomas Kejser