full text search - Sql Server ContainsTable return zero result when try to select top records -


We have implemented containsTable in SQL Server. The problem occurs when we run the query as the following:

  Select the DATAFILENAME from INNER TableName Insert (table name, BOOLEANTEXT, '("xxxx")) DATAFILENAME = KEY_TBL at KEY_TBL [KEY] and CASETYPE such as '% xxxx%'   

This will return approximately 1200 records.

But I just want to select the top 1000, here is the query as the following

  Join TableName Inside CONTAINSTABLE (TableName, select DATAFILENAME from BOOLEANTEXT, DATAFILENAME = KEY_TBL at KEY_TBL as '("xxxx", * 1000 *)') [KEY] and Likes CASETYPE '% xxxx%' **   

This query will return zero records.

I've rebuilt the full text index, have changed the auto tracking but still still see zero results.

If I am missing some point, please advise in advance

You have two questions: Choose DATAFILENAME (key) and CASETYPE like '% xxxx%'

and:

  Like [Key] and '% xxxx%' CASETYPE: 

  Choose DATAFILENAME from TableName Join INNER (tagname, boolean signal, '("xxxx"), 1000) DATAFILENAME = KEY_TBL at KEY_TBL as Code>  

The first return is 1200 records and the second is not recorded.

Conclusion: The first 1,000 rows returned by static have no matches in the tagname using the specified conditions .

If you want only 1000 rows, then use Top 1000 : Select Top 1000 DATAFILENAME TableName Join INNER (As table name, BOOLEANTEXT, '("xxxx")' DATAFILENAME = KEY_TBL at KEY_TBL ' [Key] and KEY_TBL.Rank descends like CASETYPE '% xxxx%'; Sort by

KEY_TBL.rank , then the best matching rows will be returned first.

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -