Even if you follow the instructions in the installation notes, content searches may @@ -10,39 +14,32 @@ that Intermedia is indeed functioning properly.
Create a simple table to hold some test documents:
--create table cr_test_documents ( +create table cr_test_documents ( doc_id integer primary key, author varchar2(30), format varchar2(30), title varchar2(256), doc blob -); -+);
Create an Intermedia preference to specify INSO filtering:
--begin +begin ctx_ddl.create_preference ( preference_name => 'CONTENT_FILTER_PREF', object_name => 'INSO_FILTER' - ); -+ );
If this preference has already been created, this step will cause an error that you can ignore.
Create an Intermedia index on the test table with INSO filtering:
--create index cr_test_documents_idx on cr_test_documents ( doc ) +create index cr_test_documents_idx on cr_test_documents ( doc ) indextype is ctxsys.context - parameters ('FILTER content_filter_pref' ); -+ parameters ('FILTER content_filter_pref' );
You can use SQL*Loader to load some documents into the test table. First create a control file named cr-test-docs.ctl:
--load data +load data INFILE 'cr-test-docs.data' INTO TABLE cr_test_documents APPEND @@ -51,26 +48,21 @@ format, title, ext_fname FILLER CHAR(80), - doc LOBFILE(ext_fname) TERMINATED BY EOF) -+ doc LOBFILE(ext_fname) TERMINATED BY EOF)
Copy any number of documents (Microsoft Word, PDF, text, HTML, etc.) to the filesystem of your database server. Create a data file with an entry for each document you would like to load. This is simply a comma-separated text file:
--word, Simple Story,sample-docs/simple.doc, -excel, Simple Spreadsheet,sample-docs/simple.xls -+
word, Simple Story,sample-docs/simple.doc, +excel, Simple Spreadsheet,sample-docs/simple.xls
Load the documents from the command line:
--$ sqlldr userid=cms/cms control=cr-test-docs.ctl log=cr-test-docs.log +$ sqlldr userid=cms/cms control=cr-test-docs.ctl log=cr-test-docs.log SQL*Loader: Release 8.1.6.2.0 - Production on Thu Nov 9 13:36:56 2000 (c) Copyright 1999 Oracle Corporation. All rights reserved. -Commit point reached - logical record count 2 -+Commit point reached - logical record count 2
Once the documents have been loaded, rebuild the index and run some test queries: