ArticleTrader.com
  

 Main Menu

  Home
  Member Login
  Forum
  Submit Article
  RSS Feeds
  Contact Us
  About

 Services

  Article Distribution
  Link Building

 Tools

  ArticleMS
  Directory Tracker

 Categories

  Automotive
  Business
  Computers
  » Games
  » Hardware
  » Software
  Entertainment
  Finance
  Food
  Health
  Home and Family
  Internet
  Legal
  Science
  Self Improvement
  Shopping
  Society
  Sports
  Technology
  Travel
  Writing

34 users online.



 
  » Category Sponsors
  Get Your Link Here - Limited Time Bargain at only $11/month!

Home » Computers » Software » Searching in CLOB using Oracle Text
Article Stats:
94 Views
397 Words

Get Html Code
PDF | Print View | Post to your Site

Searching in CLOB using Oracle Text

Submitted by semaphore06
Thu, 15 Feb 2007

Introduction

In the present era of Knowledge based computer applications, there is often a need to store a large amount of text based data into the Database. Moreover, the user also needs facility to search this text for specific key-words. There are several ways to provide search functionality.

If the Oracle database is used in the application, then such massive text data can be stored into Oracle database as CLOB (Character Large Object) data type. Oracle 10g supports storing of character data up to 4 GB in CLOB.

Oracle Text provides a powerful text search and text management for Oracle 10g database. Oracle Text indexes the text content for fast & accurate retrieval of information.

Usage

Let me now illustrate how to use Oracle Text for searching in CLOB data into Oracle 10g database.

There is a table in the database which is having a large text content stored as CLOB.

Table : CONTENT_TBL

CONTENT_ID NUMBER(6)

CONTENT_DESC VARCHAR2(100)

TEXT_CONTENT CLOB

Oracle Text requires an index to be created ion the field which is to be searched for. So, create an index named Content_Tbl_Index as :

CREATE INDEX Content_Tbl_Index ON

Content_Tbl (Text_Content) INDEXTYPE IS CTXSYS.CONTEXT;

Now, user can search for all content with multiple combinations of Keywords and operators, for example:

SELECT Content_Desc FROM Content_Tbl

WHERE CONTAINS (Text_Content, '%OUT SOURCING%’ OR ‘%SOFTWARE DEVELOPMENT%’ OR ‘%WEB SITE%' ) >0;

This query will return all the rows from the database with the column TEXT_CONTENT containing any of the key words ‘Out Sourcing’, ‘Software Development’, ‘Web Site’.

Concerns

While using the Oracle Text search features, I have observed that the following points are to be kept in mind for getting proper search results:

1. The keyword as well as join operators are to be provided in Upper case.

2. The keyword should be pre-fixed and suffixed by a % sign.

3. Whenever the content is changed or updated, the index does not updated automatically. It follows the ing line which needs to be executed after each “Save” process to update the index.

CTX_DDL.SYNC_INDEX (index name)

About the Author

Author:

By C.J.Derasari

C.J.Derasari is working as a Project Leader at Semaphore Infotech Pvt. Ltd, India. He has more than 16 years Experience. You can contact on email: cjd@semaphore-software.com.


Source: ArticleTrader.com
Creative Commons License

Comments

No comments posted.

Add Comment

Your Name:


Your Email:


Comment

Enter the code shown

Visual CAPTCHA

 Top Authors

 1 stickystebee (3026)
 2 alien82 (2756)
 3 kajuba (2254)
 4 limalan88 (2191)
 5 sverdlow (1712)
 6 juliet (1683)
 7 AnthonyF (1244)
 8 artavia.seo (1137)
 9 MarkeD (1089)
 10 isolvum (1019)
 11 cj (936)
 12 IC (935)
 13 jkhbraveheart (847)
 14 lets_j2top@ya.. (825)
 15 Osborne (794)
  » Member List

 Latest Forum

» ORDER BIAXIN(clarithromycin) LOWEST COST ON-LINE NO PRESCRIPTION
» somthing
» x Dejavu : db article_state table
» Why should have health insurance?
» Article 'ping' function?
» anyone having problem with website loading half way?

 Distribution

Article Distribution

  
  Affiliate Program 2Checkout.com, Inc. is an authorized retailer of ArticleTrader.com

0.47s