locked
View - Define full text index RRS feed

  • Question

  • Hi,

    Can you please help me how to define full text index in a view,

    I tried to do that, but I got the following error message:

    A unique column must be defined on this table/view.

    Please, I need your help,

    Regards,

    Nadeem

    Wednesday, April 24, 2013 6:38 AM

Answers

  • Hi Nadeem,

    You will have to specify a unique key index while creating a fulltext index. Please refer to the below link.

    msdn.microsoft.com/en-IN/library/ms187317.aspx 

    Thanks
    Ananth

    • Marked as answer by Nadim2522 Thursday, April 25, 2013 11:40 AM
    Wednesday, April 24, 2013 7:34 AM
  • What is the structure of your view? The error message seems to be clear, so if you have text column, try converting it to varchar(max) first.

    For every expert, there is an equal and opposite expert. - Becker's Law


    My blog

    • Proposed as answer by Allen Li - MSFT Thursday, April 25, 2013 5:14 AM
    • Marked as answer by Nadim2522 Thursday, April 25, 2013 11:40 AM
    Wednesday, April 24, 2013 1:06 PM

All replies

  • Hi Nadeem,

    You will have to specify a unique key index while creating a fulltext index. Please refer to the below link.

    msdn.microsoft.com/en-IN/library/ms187317.aspx 

    Thanks
    Ananth

    • Marked as answer by Nadim2522 Thursday, April 25, 2013 11:40 AM
    Wednesday, April 24, 2013 7:34 AM
  • Hi,

    Thank you for your reply, I'm getting the following error message while trying to create an index:

    Cannot create index on view 'MyGuides.dbo.vwguidesNet'. It contains text, ntext, image, FILESTREAM or xml columns.

    How can I solve this issue?

    Regards,

    Nadeem

    Wednesday, April 24, 2013 1:03 PM
  • What is the structure of your view? The error message seems to be clear, so if you have text column, try converting it to varchar(max) first.

    For every expert, there is an equal and opposite expert. - Becker's Law


    My blog

    • Proposed as answer by Allen Li - MSFT Thursday, April 25, 2013 5:14 AM
    • Marked as answer by Nadim2522 Thursday, April 25, 2013 11:40 AM
    Wednesday, April 24, 2013 1:06 PM