Chapter 52. TEXT_DDL

Table of Contents

52.1. Overview
52.2. Procedures
52.2.1. ADD_STOPWORD
52.2.2. CREATE_PREFERENCE
52.2.3. CREATE_STOPLIST
52.2.4. DROP_PREFERENCE
52.2.5. DROP_STOPLIST
52.2.6. REMOVE_STOPWORD
52.2.7. SET_ATTRIBUTE

This chapter briefly introduces the TEXT_DDL package, and describes how to use the procedures of the package.

52.1. Overview

TEXT_DDL is used to modify the configuration of TEXT INDEX while using TEXT INDEX.

Note

For more information on how to use TEXT INDEX, refer to Tibero TEXT Reference Guide.

52.2. Procedures

This section describes the procedures provided by the TEXT_DDL package, in alphabetical order.

52.2.1. ADD_STOPWORD

Adds a new stopword to a stoplist.

Details about the ADD_STOPWORD procedure are as follows:

  • Prototype

    ADD_STOPWORD 
    (
        stoplist_name        IN VARCHAR2,
        stopword             IN VARCHAR2,
        lang                 IN VARCHAR2 DEFAULT 'ALL'
    )
  • Parameter

    ParameterDescription
    stoplist_nameStoplist.
    stopwordStopword to add.
    langLanguage of the stopword. (Currently not used.)
  • Example

    SQL>EXEC TEXT_DDL.ADD_STOPWORD('DEFAULT_STOPLIST','test_word');

52.2.2. CREATE_PREFERENCE

Creates a new preference.

Details about the CREATE_PREFERENCE procedure are as follows:

  • Prototype

    CREATE_PREFERENCE 
    (
        udef_pref_name       IN  VARCHAR2,
        pdef_pref_name       IN  VARCHAR2
    )

  • Parameter

    ParameterDescription
    udef_pref_namePreference to define.
    pdef_pref_namePreference defined in Tibero TEXT.
  • Example

    SQL>EXEC TEXT_DDL.CREATE_PREFERENCE('TEST1','BASIC_WORDLIST');

52.2.3. CREATE_STOPLIST

Creates a new stoplist.

Details about the CREATE_STOPLIST procedure are as follows:

  • Prototype

    CREATE_STOPLIST 
    (
        stoplist_name        IN  VARCHAR2,
        stoplist_type        IN  VARCHAR2 DEFAULT 'DEFAULT_STOPLIST'
    )

  • Parameter

    ParameterDescription
    stoplist_nameStoplist to create.
    stoplist_typeType of stoplist to create. Currently DEFAULT_STOPLIST and KOREAN_STOPLIST are supported.
  • Example

    SQL>EXEC TEXT_DDL.CREATE_STOPLIST('new_stoplist', 'DEFAULT_STOPLIST');

52.2.4. DROP_PREFERENCE

Deletes a preference.

Details about the DROP_PREFERENCE procedure are as follows:

  • Prototype

    DROP_PREFERENCE 
    (
        udef_pref_name IN VARCHAR2
    );
  • Parameter

    ParameterDescription
    udef_pref_namePreference to delete.
  • Example

    SQL>EXEC TEXT_DDL.DROP_PREFERENCE('TEST1');

52.2.5. DROP_STOPLIST

Deletes a stoplist.

Details about the DROP_STOPLIST procedure are as follows:

  • Prototype

    DROP_STOPLIST 
    (
        stoplist_name IN VARCHAR2
    );
  • Parameter

    ParameterDescription
    stoplist_nameStoplist to delete.
  • Example

    SQL>EXEC TEXT_DDL.DROP_PREFERENCE('new_stoplist');

52.2.6. REMOVE_STOPWORD

Deletes a stopword from the stoplist.

Details about the REMOVE_STOPWORD procedure are as follows:

  • Prototype

    REMOVE_STOPWORD 
    ( 
        stoplist_name        IN VARCHAR2,
        stopword             IN VARCHAR2,
        lang                 IN VARCHAR2 DEFAULT 'ALL' 
    )
  • Parameter

    ParameterDescription
    stoplist_nameStoplist.
    stopwordStopword to delete.
    langLanguage of the stopword. (Currently not used.)
  • Example

    SQL>EXEC TEXT_DDL.REMOVE_STOPWORD('DEFAULT_STOPLIST','test_word');

52.2.7. SET_ATTRIBUTE

Configures the attributes of a preference.

Details about the SET_ATTRIBUTE procedure are as follows:

  • Prototype

    SET_ATTRIBUTE 
    (
        udef_pref_name       IN  VARCHAR2,
        attribute_name       IN  VARCHAR2,
        value                IN  VARCHAR2
    )
  • Parameter

    ParameterDescription
    udef_pref_nameUser-defined preference.
    attribute_nameAttribute to set.
    valueValue to set.
  • Example

    SQL>EXEC TEXT_DDL.SET_ATTRIBUTE('TEST1','PREFIX_INDEX','TRUE');