Link to home
Start Free TrialLog in
Avatar of duke63
duke63

asked on

SQL Server Containstable issue


Hi experts,
I replaced my contains statements in our FT Search with containstable statements.
Containstable seems to run much faster in our case.
My problem is that searching for "word1" return a specific ID.
Searching for "word2" retuns the same ID.
Searching for "word1" and "word2" dont find that ID.

Due to our programm functionality this is very important for us.
Any ideas?

select * from containstable(tblName, (txt,syn),  '"DARM*"' ) as FT_TBL
order by  FT_TBL.[Key]
Result:
Key                                    Rank
...
8455683147005	10
 
 
select * from containstable(tblName, (txt,syn),  '"MG=10ST*"' ) as FT_TBL
order by  FT_TBL.[Key]
Result
...
8455683147005	64
 
select * from containstable(tblName, (txt,syn),  '"DARM*" AND "MG=10ST*"' ) as FT_TBL
order by  FT_TBL.[Key]
 
No results!!!

Open in new window

Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

could it be that 1 part (say DARM) is in txt field, and the other part "mg=10ST" in the syn field ?
that would explain the results...
Avatar of duke63
duke63

ASKER

hi angellll,

that is correct.
I didnt expect that behavior.
Any idea how to handle this with containstable?
ASKER CERTIFIED SOLUTION
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of duke63

ASKER

thanks a lot angelIII !!