2012年3月9日星期五

Full Text Compatible index

I want to put a full text search on a table. using SQL Server Management
Studio 20005.
The table has a clustered Key Like this:
Thing,Version,Field1,Field2 and so on.
The Key is Thing and Version.
I can create a index on these columns but it will not show up in the Full
Text Index utility (Full Text Index)(Define Full Text Index) Selection from
the table right click menu.
I have also tried no Clustered Key and just a index of the two fields which
does not work.
I might mention that other tables with only one column for the key work for
Full Text search.
Thank you
JerryHi Jerry,
From your description, I understand that the indexed columns were not
displayed in the Full Text Index wizard in SSMS. The table had a clustered
key index with two columns. This issue did not occur if there is only one
Key column.
If I have misunderstood, please let me know.
This is expected by design. Essentially the problem was caused by KEY INDEX
constraints.
You may refer to:
CREATE FULLTEXT INDEX (Transact-SQL)
http://technet.microsoft.com/en-us/...y/ms187317.aspx
From the article, we can see the following description regarding KEY INDEX:
<ref>
KEY INDEX index_name
Is the name of the unique key index on table_name. The KEY INDEX must be a
unique, single-key, non-nullable column. Select the smallest unique key
index for the full-text unique key. For best performance, a CLUSTERED index
is recommended.
</ref>
As you can see that the KEY INDEX can only be a single-key. Compound keys
are not allowed. To work around this issue, I recommend that you create a
single column with unique index so that the full-text index can be
correlated to rows in the table.
Hope this helps. If you have any other questions or concerns, please feel
free to let me know. It is my pleasure to be of assistance.
Best regards,
Charles Wang
Microsoft Online Community Support
========================================
=============
When responding to posts, please "Reply to Group" via
your newsreader so that others may learn and benefit
from this issue.
========================================
==============
This posting is provided "AS IS" with no warranties, and confers no rights.
========================================
==============|||Charles,
Thanks. I will use a identity column for the Index
--
Jerry
"Charles Wang[MSFT]" wrote:

> Hi Jerry,
> From your description, I understand that the indexed columns were not
> displayed in the Full Text Index wizard in SSMS. The table had a clustered
> key index with two columns. This issue did not occur if there is only one
> Key column.
> If I have misunderstood, please let me know.
> This is expected by design. Essentially the problem was caused by KEY INDE
X
> constraints.
> You may refer to:
> CREATE FULLTEXT INDEX (Transact-SQL)
> http://technet.microsoft.com/en-us/...y/ms187317.aspx
> From the article, we can see the following description regarding KEY INDEX
:
> <ref>
> KEY INDEX index_name
> Is the name of the unique key index on table_name. The KEY INDEX must be a
> unique, single-key, non-nullable column. Select the smallest unique key
> index for the full-text unique key. For best performance, a CLUSTERED inde
x
> is recommended.
> </ref>
> As you can see that the KEY INDEX can only be a single-key. Compound keys
> are not allowed. To work around this issue, I recommend that you create a
> single column with unique index so that the full-text index can be
> correlated to rows in the table.
> Hope this helps. If you have any other questions or concerns, please feel
> free to let me know. It is my pleasure to be of assistance.
> Best regards,
> Charles Wang
> Microsoft Online Community Support
> ========================================
=============
> When responding to posts, please "Reply to Group" via
> your newsreader so that others may learn and benefit
> from this issue.
> ========================================
==============
> This posting is provided "AS IS" with no warranties, and confers no rights
.
> ========================================
==============
>
>

没有评论:

发表评论