all groups > sql server full text search > september 2006 >
You're in the

sql server full text search

group:

Problems with CONTAINS


Problems with CONTAINS LeCitadin
9/18/2006 11:47:31 AM
sql server full text search:
Hi,

I am executing the followings SELECT and the results are not as
expected.

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Search 1

SELECT Valeur
FROM RechercheChaines
WHERE CONTAINS (Valeur, 'HYDRO-QU=C9BEC')

Valeur













































































































--------------------------------------------
BROCHURE HYDRO-QU=C9BEC

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Search 2

SELECT Valeur
FROM RechercheChaines
WHERE Valeur LIKE '%HYDRO-QU=C9BEC%'

Valeur













































































































--------------------------------------------
BROCHURE HYDRO-QU=C9BEC
BROCHURE PUBLICATION D'HYDRO-QU=C9BEC
PUBLICATION D'HYDRO-QU=C9BEC
RAPPORT ANNUEL PUBLICATION D'HYDRO-QU=C9BEC
RAPPORT PUBLICATION D'HYDRO-QU=C9BEC
RAPPORT TECHNIQUE PUBLICATION D'HYDRO-QU=C9BEC
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

As you can see, the two SELECT does not return the same results. The
search 2 is the one I was expected in the fulltext search.

We are using a french separator file.

Any ideas ?
Re: Problems with CONTAINS Hilary Cotter
9/18/2006 9:07:21 PM
I assume you are using the French Word breaker even though you are in
Quebec. In this case HYDRO-QUÉBEC will only match with HYDRO-QUÉBEC. If you
are using by change the US or UK English word breakers or the neutral word
breaker it will match with HYDRO QUÉBEC, HYDRO-QUÉBEC, or HYDRO. QUÉBEC.
Does this explain what you are seeing?


--
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.

This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.

Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html

Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com



[quoted text, click to view]
Hi,

I am executing the followings SELECT and the results are not as
expected.

======================================
Search 1

SELECT Valeur
FROM RechercheChaines
WHERE CONTAINS (Valeur, 'HYDRO-QUÉBEC')

Valeur













































































































--------------------------------------------
BROCHURE HYDRO-QUÉBEC

======================================
Search 2

SELECT Valeur
FROM RechercheChaines
WHERE Valeur LIKE '%HYDRO-QUÉBEC%'

Valeur













































































































--------------------------------------------
BROCHURE HYDRO-QUÉBEC
BROCHURE PUBLICATION D'HYDRO-QUÉBEC
PUBLICATION D'HYDRO-QUÉBEC
RAPPORT ANNUEL PUBLICATION D'HYDRO-QUÉBEC
RAPPORT PUBLICATION D'HYDRO-QUÉBEC
RAPPORT TECHNIQUE PUBLICATION D'HYDRO-QUÉBEC
======================================

As you can see, the two SELECT does not return the same results. The
search 2 is the one I was expected in the fulltext search.

We are using a french separator file.

Any ideas ?

AddThis Social Bookmark Button