Oracle full text search with ASP.NET

First you need oracle full text search to be installed.

Then you have to create index on some field in table, this field can be any type: text, number or even file. Oracle text search supports pdf, doc,… and some other file types.

for example we have a table MyTable with following structure

Id number
title nvarchar(50)
attachment blob

field attachment contains files in format pdf, txt, doc…

if you try to search text ‘find me’ on column attachment, you will get error message, because this column is not indexed,

Select tbl.id, tbl.title, tbl.attachment from MyTable tbl
Where contains (tbl.attachment, ‘find me’);

After you create index, you can search in this fields. To create index run the following statement

Create index my_index_name_attachment_idx on MyTable(attachment) INDEXTYPE IS CTXSYS.CONTEXT PARAMETERS ('SYNC ( ON COMMIT)')

And now you can select data from table and the oracle full text search works.

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>