2012年3月27日星期二

Full Text Search Sql Express, Quatation Mark

When I try to search a string including Quatation Mark it fails:

Like: The new Book "Harry Potter" is

it stated that the syntax is incorrect.

by the way I am also using * for indicating any suffix.

What is the correct syntax for searching: "

Itzik

Hi!,

You can not include quotation marks inside your string. In addition, these characters are being ignored at indexing time (ignored by the language wordbreaker you are using by default), so are not considered either in your query. This means that when searching for ' The new Book "Harry Potter" is' , internally gets translated as : 'The new Book Harry Potter is'. So you dont have to worry about this quotation marks in your query.

the query:

CONTAINS(ftColum,"The new Book Harry Potter is")

will return any row having the following text:

The new Book Harry Potter is

or

The new Book "Harry Potter" is

or

The new Book /Harry Potter/ is

or

The new Book #Harry Potter# is

etc... (note that special characters are ignored at indexing and query time...)

In SQL Server FTS, we support prefix (foo*), but not suffix (*foo).

Thanks

|||

Are you sure a bout that

In hebrew there we wrote initials with "

so if for instance I want to wrote the name of the city Beer Sheba I will wrote it in hebrew b"s

?"?

So I need to search those words, and when searching BS as you suggested it is not workin.

again on sql express 2005 edition since on full sql 2000 edition I can execute B"S and I would get the needed results.

Any Idea or any link to an article by microsoft on that subject

Itzik

没有评论:

发表评论