Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ctx_doc.policy_filter is stuck processing file

Martin Giffy D'SouzaOct 23 2019 — edited Oct 29 2019

I'm trying to convert a blob to clob as part of my Oracle Text index definition. For the most part using ctx_doc.policy_filter works fine, however one file is is getting "stuck" in the call. It is not raising an error, just that the procedure does not finish. I've been able to isolate the issue using the sample code below.

Unfortunately I can not include the original PDF as it has sensitive information.

Does anyone have an idea why this may happen and potential work arounds?

-- Create Policy (only needs to be done once)

begin

  ctx_ddl.create_policy(

    policy_name => 'my_ctx_policy',

    filter=> 'ctxsys.auto_filter'

  );

end;

/

-- Process a file from the "documents" table

declare

  l_blob blob;

  l_clob clob := null;

begin

  select d.file_blob

  into l_blob

  from documents d

  where d.document_id = 123;

  -- Code gets "stuck" here on some types of documents

  -- Current one is a scanned PDF (not good quality / 3 pages)

  ctx_doc.policy_filter(

    policy_name => 'my_ctx_policy',

    document => l_blob,

    restab => l_clob,

    plaintext => true

  );

end;

/

Comments
Post Details
Added on Oct 23 2019
6 comments
1,129 views