Search code examples
full-text-searchhanaunique-constraint

SAP HANA Create FullText Index [301]: unique constraint violated


This statement worked previously. Now it does not work any more. The only thing changed is an upgrad from SAP HANA SPS 08 to SPS 09

Create FullText Index "XING_DESC_FTI" On "XING_DESC"("DESCRIPTION")
TEXT ANALYSIS ON
LANGUAGE DETECTION ('EN', 'DE')
CONFIGURATION 'EXTRACTION_CORE';

Error Message:

Could not execute 'Create FullText Index "XING_DESC_FTI" On "XING_DESC"("DESCRIPTION") TEXT ANALYSIS ON LANGUAGE ...' in 8 ms 578 µs .

[301]: unique constraint violated: Table(CS_COLUMNS_), Index(IDX_CS_COLUMNS_PK)


Solution

  • Work-around:

    1. Copy the table XING_DESC (create new table with the same structure, insert data from XING_DESC)
    2. Drop, Create XING_DESC and insert data from copied table (make sure all indexes are also deleted)
    3. Execute the "Create FulText Index" statement again.