バージョンごとのドキュメント一覧

CREATE TEXT SEARCH PARSER

CREATE TEXT SEARCH PARSER <refpurpose>define a new text search parser</refpurpose> — 新しいテキスト検索パーサを定義する

概要

CREATE TEXT SEARCH PARSER name (
    START = start_function ,
    GETTOKEN = gettoken_function ,
    END = end_function ,
    LEXTYPES = lextypes_function
    [, HEADLINE = headline_function ]
)

説明

<title>Description</title>

<command>CREATE TEXT SEARCH PARSER</command> creates a new text search parser. A text search parser defines a method for splitting a text string into tokens and assigning types (categories) to the tokens. A parser is not particularly useful by itself, but must be bound into a text search configuration along with some text search dictionaries to be used for searching. CREATE TEXT SEARCH PARSERは新しいテキスト検索パーサを作成します。 テキスト検索パーサは、テキスト文字列をトークンに分割し、トークンに型(カテゴリ)を割り当てる方法を定義します。 パーサ自体は特別有用なものではありませんが、検索するためには、数個のテキスト検索辞書と共にテキスト検索設定と関連付けされなければなりません。

If a schema name is given then the text search parser is created in the specified schema. Otherwise it is created in the current schema. スキーマ名が指定された場合、テキスト検索パーサは指定されたスキーマ内に作成されます。 そうでなければ、現在のスキーマに作成されます。

You must be a superuser to use <command>CREATE TEXT SEARCH PARSER</command>. (This restriction is made because an erroneous text search parser definition could confuse or even crash the server.) CREATE TEXT SEARCH PARSERを使用するには、スーパーユーザでなければなりません。 (おかしなテキスト検索パーサ定義はサーバを混乱させ、クラッシュさせる可能性があるため、この制限があります。)

Refer to <xref linkend="textsearch"/> for further information. 詳細は第12章を参照してください。

パラメータ

<title>Parameters</title>
name

The name of the text search parser to be created. The name can be schema-qualified. 作成するテキスト検索パーサの名称です。 この名前はスキーマ修飾することができます。

start_function

The name of the start function for the parser. パーサの開始関数の名称です。

gettoken_function

The name of the get-next-token function for the parser. 次トークンを取り出すパーサの関数の名称です。

end_function

The name of the end function for the parser. パーサの終了関数の名称です。

lextypes_function

The name of the lextypes function for the parser (a function that returns information about the set of token types it produces). パーサのLEXTYPE関数(生成するトークン型集合に関する情報を返す関数)の名称です。

headline_function

The name of the headline function for the parser (a function that summarizes a set of tokens). パーサの見出し関数(トークン集合を要約する関数)の名称です。

The function names can be schema-qualified if necessary. Argument types are not given, since the argument list for each type of function is predetermined. All except the headline function are required. 関数名は必要に応じてスキーマ修飾可能です。 各種関数の引数リストは事前に決められているため、引数型の指定はありません。 見出し関数以外の関数はすべて必要です。

The arguments can appear in any order, not only the one shown above. 引数は、上で示した順序だけではなく、任意の順序で記述することができます。

互換性

<title>Compatibility</title>

There is no <command>CREATE TEXT SEARCH PARSER</command> statement in the SQL standard. 標準SQLにはCREATE TEXT SEARCH PARSER文はありません。

関連項目

<title>See Also</title> ALTER TEXT SEARCH PARSER, DROP TEXT SEARCH PARSER