Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 containstable() not returning all the results

Author  Topic 

krishna.netblogs
Starting Member

7 Posts

Posted - 2012-07-27 : 09:13:36
Hi

We have a application where customers search for data. In this page we provide search type is a drop down list box.There are four choices are

1.Exact Phrase

2.Any of the Word

3.All of the words

4.Boolean Search

the user type a string and select one of the search type from this list,Then accordingly we have to show the results. We have to write a sql query to return results.We have wriiten sql using containstable().But it does not return all the results.

The below query we are using..

SELECT Distinct TOP 50 c.case_id,cal.cas_details
From g_case_action_log cal (READUNCOMMITTED)
Inner Join g_case c (READUNCOMMITTED) ON (cal.case_id = c.case_id)
INNER JOIN containstable(es.g_case_action_log, cas_details,
' "searchword" OR "<br>searchword" OR "searchword<br> " ') AS key_tbl
ON cal.log_id = key_tbl.[key]

Is there any improvements to get all the results

Or Any one has implemented the same scenario. can you please help this issue.


Please help

With Regards
krishna


krishna.netblogs
Starting Member

7 Posts

Posted - 2012-09-18 : 08:21:15
Hi
This issue has been resolved by changing one of settings of FullText Catalog i.e. Track Changes.this property has 3 options.
1) Automatic
2) Manual
3) Do not track changes
But the 3rd (Do not track changes) option has selected in our case during FTCatalog installation.that's why we are getting this issue.Now we have selected as Automatic .Now we are getting expected results.

Thanks
Go to Top of Page
   

- Advertisement -