Index: openacs-4/packages/acs-content-repository/www/doc/intermedia.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/www/doc/intermedia.adp,v diff -u -N -r1.4.2.2 -r1.4.2.3 --- openacs-4/packages/acs-content-repository/www/doc/intermedia.adp 3 Sep 2021 09:14:39 -0000 1.4.2.2 +++ openacs-4/packages/acs-content-repository/www/doc/intermedia.adp 13 Jul 2023 12:47:28 -0000 1.4.2.3 @@ -10,32 +10,39 @@ that Intermedia is indeed functioning properly.

Create a document table

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' ); +

Load test documents

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
@@ -44,21 +51,26 @@
  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 +

Test search

Once the documents have been loaded, rebuild the index and run some test queries: