12 Replies Latest reply on Mar 30, 2017 1:03 PM by seb93

    [RESOLVED] Indexing a BLOB with Oracle Text

    seb93

      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 ?

        • 1. Re: Indexin a BLOB with Oracle Text
          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

          • 2. Re: Indexin a BLOB with Oracle Text
            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.

            • 3. Re: Indexin a BLOB with Oracle Text
              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

              • 4. Re: Indexin a BLOB with Oracle Text
                Barbara Boehmer

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

                • 5. Re: Indexin a BLOB with Oracle Text
                  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.

                  • 6. Re: Indexin a BLOB with Oracle Text
                    seb93

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

                    • 7. Re: Indexin a BLOB with Oracle Text
                      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)

                      • 8. Re: Indexin a BLOB with Oracle Text
                        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")

                        • 9. Re: Indexin a BLOB with Oracle Text
                          seb93

                          With NULL_FILTER this is what append:

                           

                          • 10. Re: Indexin a BLOB with Oracle Text
                            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

                            • 11. Re: Indexin a BLOB with Oracle Text
                              Roger Ford-Oracle

                              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.

                              1 person found this helpful
                              • 12. Re: Indexin a BLOB with Oracle Text
                                seb93

                                YES

                                 

                                It works now !!

                                 

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

                                 

                                THANK YOU VERY MUCH everybody !!

                                 

                                Best regards