How to Create a binary file index in Oracle

Source: Internet
Author: User

The ORACLE tutorial is: how to create a binary file index in Oracle. Oracle text is the full-text retrieval technology of Oracle, and is part of the 9i Standard Edition and Enterprise Edition. Oracle text uses the standard SQL language to index, search, and analyze text and documents stored in oracle databases, files, or networks. Oracle text can perform language analysis on documents and search for documents using multiple methods, including keywords, context queries, logical operations, pattern matching, hybrid topic queries, and search for HTML/XML paragraphs. Oracle text is superior in hybrid queries that contain text and structured link attributes. The following is an example.

The existing document table ZYCONTENT_TABLE is the storage table for the uploaded files, and the binary files are stored in the BLOB_CONTENT column as BLOB. oracle text technology provides a method to index the binary text files in the BLOB column, the details are as follows:

I. Preparations

The mode of the Document Table is ZYFILEUP, and the document table is ZYCONTENT_TABLE. The document table is defined:

2. Create text index authorization for mode with document tables

Connect to the database as a system user and authorize ZYFILEUP.

3. Create an index for the document table on the BLOB_CONTENT Column

Use ZYFILEUP to connect to the database and create a text index reference

Create an index

Iv. Index synchronization and Deletion

Two ways to synchronize indexes:

And

How to delete an index:

V. index function Introduction

1. index file type

Oracle text can be used to filter and extract content from documents of different formats. It supports more than 150 document formats. The most common ms office documents and PDF documents can be searched by Oracle text.

2. Introduction to Filters

For plain text files, such as TXT, HTML, and XML files, use an empty filter, that is, NULL_FILTER. For binary files, use the INSO_FILTER filter, if the BLOB column in the document table contains binary files and plain text files, you must use the INSO_FILTER filter, but it is best to store and index the plain text and binary files separately. Oracle text also provides a package to extract text from a binary file to a plain text file.

3. Dictionary

You can customize a dictionary in different languages. The dictionary contains the level relationship between consent words and words. Oracle text supports searching documents written across Western, Japanese, Korean, traditional, and simplified Chinese languages.

Vi. Text query statement format

The contains function provides powerful query functions, which are in the relationship with "," or ", near;) and not ~) It can also query texts of different languages based on a keyword. Of course, you must set a dictionary in advance.

VII. Problems in practical application

In my practical application, Oracle text is commonly used to index Chinese documents in Word, Excel, PowerPoint, HTML, PDF, and other formats. However, I found that, no matter whether INSO_FILTER or NULL_FILTER is used, BASIC_LEXER or CHINESE_LEXER cannot be used to retrieve text documents in the RTF format. I did not succeed in win2000 or XP. I do not know why. In general, the text retrieval function of Oracle text is still outstanding. It does not even need to store text files in the database, even if it is stored in the file directory of the operating system, oracle text can also create indexes for files in the database.

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.