Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

CREATE TEXT SEARCH CONFIGURATION

Updated on 2022-08-16 GMT+08:00

Function

CREATE TEXT SEARCH CONFIGURATION creates a text search configuration. A text search configuration specifies a text search parser that can divide a string into tokens, plus dictionaries that can be used to determine which tokens are of interest for searching.

Important Notes

  • If only the parser is specified, then the new text search configuration initially has no mappings from token types to dictionaries, and therefore will ignore all words. Subsequent ALTER TEXT SEARCH CONFIGURATION commands must be used to create mappings to make the configuration useful. If COPY option is specified, the parser, mapping and configuration option of text search configuration is copied automatically.
  • If a schema name is specified, the text search configuration will be created in the specified schema. Otherwise, the configuration will be created in the current schema.
  • The user who defines a text search configuration becomes its owner.
  • PARSER and COPY options are mutually exclusive, because when an existing configuration is copied, its parser selection is copied too.

Syntax

1
2
3
CREATE TEXT SEARCH CONFIGURATION name 
    ( PARSER = parser_name | COPY = source_config )
    [ WITH ( {configuration_option = value} [, ...] )];

Parameter Description

  • name

    Specifies the name of the text search configuration to be created. Specifies the name can be schema-qualified.

  • parser_name

    Specifies the name of the text search parser to use for this configuration.

  • source_config

    Specifies the name of an existing text search configuration to copy.

  • configuration_option

    Specifies the configuration parameter of text search configuration is mainly for the parser executed by parser_name or contained by source_config.

    Value range: The default, ngram, and zhparser parsers are supported. The parser of default type has no corresponding configuration_option. Table 1 lists configuration_option for ngram and zhparser parsers.
    Table 1 Configuration parameters for ngram and zhparser parsers

    Parser

    Parameters for adding an account

    Description

    Value Range

    ngram

    gram_size

    Length of word segmentation

    Integer, 1 to 4

    Default value: 2

    punctuation_ignore

    Whether to ignore punctuations

    • true (default value): Ignore punctuations.
    • false: Do not ignore punctuations.

    grapsymbol_ignore

    Whether to ignore graphical characters

    • true: Ignore graphical characters.
    • false (default value): Do not ignore graphical characters.

    zhparser

    punctuation_ignore

    Whether to ignore special characters including punctuations (\r and \n will not be ignored) in the word segmentation result

    • true (default value): Ignore all the special characters including punctuations.
    • false: Do not ignore all the special characters including punctuations.

    seg_with_duality

    Whether to aggregate segments with duality

    • true: Aggregate segments with duality.
    • false (default value): Do not aggregate segments with duality.

    multi_short

    Whether to execute long words composite divide

    • true (default value): Execute long words composite divide.
    • false: Do not execute long words composite divide.

    multi_duality

    Whether to aggregate segments in long words with duality

    • true: Aggregate segments in long words with duality.
    • false (default value): Do not aggregate segments in long words with duality.

    multi_zmain

    Whether to display key single words individually

    • true: Display key single words individually.
    • false (default value): Do not display key single words individually.

    multi_zall

    Whether to display all single words individually.

    • true: Display all single words individually.
    • false (default value): Do not display all single words individually.

Examples

Create a text search configuration.

1
CREATE TEXT SEARCH CONFIGURATION ngram1 (parser=ngram) WITH (gram_size = 2, grapsymbol_ignore = false);

Create a text search configuration.

1
CREATE TEXT SEARCH CONFIGURATION ngram2 (copy=ngram1) WITH (gram_size = 2, grapsymbol_ignore = false);

Create a text search configuration.

1
CREATE TEXT SEARCH CONFIGURATION english_1 (parser=default);

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback