Oracle Full-Text Search

Source: Internet
Author: User

I. Log in to Oracle using SYS user

(1) Run-cmd-sqlplus-sys/password @ Connect character as Sysdba

Ii. Delegation of authority

1, Grant Ctxapp to full-text search user use;

2. Grant execute on Ctx_dll to full-text retrieval using the user;

3. Full-Text search using User login Oracle can log on through the PL/SQL interface, and the following operations are done in the PL/SQL interface.

Iii. Creating an analyzer

BEGIN
--Set the lexical parser name: ' Oratext_lexer ', type: ' Chinese_vgram_lexer '
Ctx_ddl.create_preference (' oratext_lexer ', ' chinese_vgram_lexer ');

END;

Iv. Creating Table Indexes

CREATE index name on table name ( field ) Indextype is ctxsys.context parameters (' lexer oratext_lexer ' ); --Parser name
Commit

The above is the index is completed, you can test the error: SELECT * from Ctx_user_index_errors

You can use the statement query: SELECT * FROM Table A where contains (a.name, ' yield ') > 0 order by A.name;

Five, index optimization (for data changes: Add, delete, modify)

BEGIN

Index synchronization:
Ctx_ddl.sync_index (' Idx_querydatacol ');

Index optimization:
Ctx_ddl.optimize_index (' Idx_querydatacol ', ' full ');

END;

Six, cut words to divide the phrase to reorganize

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.