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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

[RESOLVED] Indexing a BLOB with Oracle Text

seb93Mar 21 2017 — edited Mar 30 2017

Hello,

I am a beginner in Oracle Text.

I created a table (docs) with two colums (numero NUMBER, doc BLOB) to store documents PDF and Microsoft Word.

I would create an index with the column doc but it doesn't work.

CODE:

create index myindex on docs(doc)

  indextype is ctxsys.context

  PARAMETERS (FILTER CTXSYS.AUTO_FILTER);

Index is really created but no words are stored in the tables (DR$MYINDEX$I, DR$MYINDEX$K, DR$MYINDEX$N, DR$MYINDEX$R) wich are created by Oracle Text.

Can you help me please ?

This post has been answered by Roger Ford-Oracle on Mar 30 2017
Jump to Answer

Comments

Mike Kutz

If the tables exist, then the index was created.

By default, the index is not synchronized.

That is - you won't find any information in those tables after you INSERT and COMMIT.

(there is usually a table that contains the ROWID of the new rows, but don't know about Oracle Text)

You'll need to read the Oracle Text documents on how to sync the index. (RTFM)

I don't know it off the top of my head.

MK

seb93

Thanks for your interest !

I'll read the Oracle text documentation about synchronization !

I forgot to precise that I use Oracle XE 11g.

I tryed to do this my manipulations on Oracle 12c Enterprise Edition and it work.

seb93

I found why my index doesn't word.

My version of Oracle is on Red hat Enterprise Linux and when I use the parameter FILTER CTXSYS.AUTO_FILTER, I have an error: DRG-11207: user filter command exited with status 127

when I execute the following request: SELECT * FROM ctx_user_index_errors;

Thanks in advance

Barbara Boehmer

What happens if you create the index without the filter parameter?

Roger Ford-Oracle

Might be a library issue.

First, try setting LD_LIBRARY_PATH to point to $ORACLE_HOME/lib before starting the SQL*Net listener (assuming you're connecting via SQL*Net)

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH

lsnrctl stop

lsnrctl start

Then recreate the index.

If that doesn't work, try running the filter executable ctxhx from the command line. Set LD_LIBRARY_PATH as before, then run:

$ORACLE_HOME/ctx/bin/ctxhx


That should give you a usage message.  If there are any shared libraries missing you'll get an error.

seb93

Thank for your interest, I'll try it and give you a feedback.

seb93

This my listener.ora:

# listener.ora Network Configuration File:

SID_LIST_LISTENER =

  (SID_LIST =

    (SID_DESC =

      (SID_NAME = PLSExtProc)

      (ORACLE_HOME = /u01/app/oracle/product/11.2.0/xe)

      (ENVS=LD_LIBRARY_PATH = /u01/app/oracle/product/11.2.0/xe/lib:/u01/app/oracle/product/11.2.0/xe/ctx/lib")

      (PROGRAM = extproc)

    )

    (SID_DESC =

      (SID_NAME = XE)

      (ORACLE_HOME = /u01/app/oracle/product/11.2.0/xe)

    )

  )

LISTENER =

  (DESCRIPTION_LIST =

    (DESCRIPTION =

      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))

      (ADDRESS = (PROTOCOL = TCP)(HOST = gpsr-tb-squ)(PORT = 1521))

    )

  )

DEFAULT_SERVICE_LISTENER = (XE)

Roger Ford-Oracle

One obvious problem with that file is that you have double quotes at the end of the ENVS path but not at the beginning. I would remove the spaces as well.

Try changing it to :

(ENVS="LD_LIBRARY_PATH=/u01/app/oracle/product/11.2.0/xe/lib:/u01/app/oracle/product/11.2.0/xe/ctx/lib")

seb93

With NULL_FILTER this is what append:

pastedImage_0.png

seb93

I tryed but it doesn't work yet.

I tryed this also:

First, try setting LD_LIBRARY_PATH to point to $ORACLE_HOME/lib before starting the SQL*Net listener (assuming you're connecting via SQL*Net)

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH

lsnrctl stop

lsnrctl start

and it doesn't work to.

However, I thinck I don't have the library (libstcd++.so.5) beceaus I have an error when I run this command: $ORACLE_HOME/ctx/bin/ctxhx

Roger Ford-Oracle
Answer

Sounds like it. You probably need to run something like:

sudo yum install compat-libstdc++-33

Are you by any chance on RedHat 7?  On RedHat 7 that library has been moved to the "optional" package repository, and it's necessary to set up your yum to look there. That can be done using:

sudo yum-config-manager --enable rhel-7-server-optional-rpms

If you're on a system that uses apt-get rather than yum, I'm afraid I can't help directly, but you should be able to figure it out from this info.

Marked as Answer by seb93 · Sep 27 2020
seb93

YES

It works now !!

I installed the library: compat-libstdc++-33

THANK YOU VERY MUCH everybody !!

Best regards

1 - 12
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Apr 27 2017
Added on Mar 21 2017
12 comments
4,170 views