ContainsTable: noise/stop word giving no results

92 views Asked by At

Suppose you have the following queries (using PT language):

declare @textoPesquisa as nvarchar(200) = 'haiti and florida and à'
if(@textoPesquisa is null or @textoPesquisa='') set @textoPesquisa = '*'

select * from Noticias n    
 left join containstable(NoticiasParaEstatistica, (Titulo), @textoPesquisa, 
                          LANGUAGE N'Portuguese')  s on n.IdNoticia=s.[key]
 where s.[key] is not null

 select * from NoticiasParaEstatistica where contains(titulo, 
       @textoPesquisa,LANGUAGE N'Portuguese')

I'm under the impression that à is considered a stop word, so the previous queries return no results (due to the fact that I'm using AND). Now, if I turn off the stopword list, everything works fine, but that doesn't look like a good option.

After looking at the docs, I've found the transform noise words option. I've activated it in the server and I've rebuilt the catalog, but I'm still getting 0 results.

Btw, here's table + insert that might be able to reproduce this scenario:

CREATE TABLE [dbo].[NoticiasParaEstatistica](
   [IdNoticia] [bigint] NOT NULL,
   [Titulo] [varchar](400) NOT NULL
 CONSTRAINT [PK_NoticiasParaEstatistica] PRIMARY KEY CLUSTERED 
(
   [IdNoticia] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, 
 ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO


INSERT INTO NoticiasParaEstatistica (Titulo)
values ('haiti florida à')

What am I missing?

thanks!

0

There are 0 answers