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.3 -r1.4 --- openacs-4/packages/acs-content-repository/www/doc/intermedia.adp 7 Aug 2017 23:47:47 -0000 1.3 +++ openacs-4/packages/acs-content-repository/www/doc/intermedia.adp 30 Apr 2018 08:15:07 -0000 1.4 @@ -10,39 +10,33 @@ 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 )
   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
@@ -51,16 +45,13 @@
  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 file system 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
@@ -69,8 +60,7 @@
 
 (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:

@@ -87,5 +77,5 @@ karlg\@arsdigita.com
-Last revised: $‌Id: intermedia.html,v 1.1.1.1.30.1 2016/06/22 -07:40:41 gustafn Exp $ +Last revised: $‌Id: intermedia.html,v 1.2 2017/08/07 23:47:47 +gustafn Exp $