Oracle Text, create index (indextype is ctxsys.context)

Dear sirs,
I am a new user of Oracle Text (Oracle 11g release 11.2) and I am unable to create an index of type ctxsys.context). Any suggestions?:
code:
drop table mytable;
drop index myindex force;
create table mytable(id number primary key, docs clob);
insert into mytable values(111555,'this text will be indexed');
insert into mytable values(111556,'this is a default datastore example');
commit;
create index myindex on mytable(docs)
indextype is ctxsys.context
parameters ('DATASTORE CTXSYS.DEFAULT_DATASTORE');
+++++++
error messages:
create index myindex on mytable(docs)
ERROR at line 1:
ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
ORA-20000: Oracle Text error:
ORA-06508: PL/SQL: could not find program unit being called
ORA-06512: at "CTXSYS.DRUE", line 160
ORA-06512: at "CTXSYS.TEXTINDEXMETHODS", line 366

Please check for invalid objects. Log on as sys or system and run:
select owner, object_name, object_type from all_objects where status='INVALID';
Post the results here and we'll advise the next step.
If any objects owned by CTXSYS are invalid you may need to recompile the CTXSYS schema.

Similar Messages

  • Question: create index indextype is ctxsys.context whith NOLOGGING

    Dear All,
    I would like to ask a question about
    CREATE INDEX <index_name> ON <table_name> ( <index_col> ) INDEXTYPE IS CTXSYS.CONTEXT PARAMETERS ( ... )maybe you experienced that ctxsys.context index creation takes long time.
    When you create a ctxsys.context index it is obvious to reduce the workload of the RDBMS. In this case I would like to reduce the I/O load with NOLOGGING option.
    Firstly, I try to put the index into a tablespace with no logging option. I don't know why but it is not working. Watching the alert.log file I diagnose that redo log generated simultaneously while index generated (there are no other activity on RDBMS).
    Q1 (optional): Why generating redo on object of NOLOGGING tablaspace ?
    I think there are better solution: use the NOLOGGIN option of the create index command which is very simple to use at column indexes.
    Which unclear to me how should I use in CREATE INDEX .. INDEXTYPE IS CTXSYS.CONTEXT command.
    Fllowing the CREATE INDEX command syntax seems oubvious - but it provides sytax error.
    Maybe this is why CREATE INDEX .. INDEXTYPE IS CTXSYS.CONTEXT needs something different for options: PL/SQL
    example captured (for options):
    begin
    ctx_ddl.create_preference ('mystore', 'BASIC_STORAGE');
    ctx_ddl.set_attribute ('mystore', 'I_INDEX_CLAUSE', 'tablespace users storage (initial 32k) compress 2');
    end;
    CREATE INDEX docs_idx ON my_docs(doc) INDEXTYPE IS CTXSYS.CONTEXT PARAMETERS ('STORAGE mystore');Q: How can I specify NOLOGGING option? In the index command? In the attribute? What is the exact syntax if NOLOGGING is allowed at ctxsys.context?
    Oracle version: 11.1.0.6.0
    Any advice, highly appreciated.
    Istvan

    You have to specify nologging in  storage preference.
    See Avoiding Redo Logging for an Oracle Text Domain Index (Doc ID 432762.1)
    Example:
    begin
    ctx_ddl.drop_preference('my_storage');
    end;
    begin
    ctx_ddl.create_preference('my_storage','BASIC_STORAGE');
    end;
    begin
    ctx_ddl.set_attribute('my_storage', 'i_table_clause','tablespace foo1 storage (initial 5M next 10M pctincrease 0 freelists 24 freelist groups 24) nologging');
    ctx_ddl.set_attribute('my_storage', 'k_table_clause','tablespace foo2 storage (initial 5M next 10M pctincrease 0) nologging');
    ctx_ddl.set_attribute('my_storage', 'r_table_clause','tablespace foo3 storage (initial 5M next 10M pctincrease 0) lob(DATA) store as (nocache nologging) nologging');
    ctx_ddl.set_attribute('my_storage', 'n_table_clause','tablespace foo4 storage (initial 5M next 10M pctincrease 0) nologging');
    ctx_ddl.set_attribute('my_storage', 'p_table_clause','tablespace foo5 storage (initial 5M next 10M pctincrease 0) nologging');
    ctx_ddl.set_attribute('my_storage', 'i_index_clause','tablespace foo6 storage (initial 5M next 10M pctincrease 0) compress 2 nologging');
    end;

  • How do I get Oracle Text to index files on a file server?

    I am new to Oracle (I'm a MS-SQL DBA looking for a Full-Text Search solution that is better than linking to a MS index server.)
    So - Here's the objective:
    I have Oracle Server(Express) installed on a Windows server.
    I would like for Oracle to build a Full-Text Catalog of the files on a separate file server based on file paths in a table in the database.
    (No desire to store terabytes of images and documents inside the database)
    I can get Oracle text up and running, using the URL_Datastore:
    CREATE TABLE files (id NUMBER PRIMARY KEY, issue_id NUMBER, path VARCHAR(255) UNIQUE, ot_format VARCHAR(6), ot_version VARCHAR(10));
    The Compaq server is a remote windows server on my local workgroup, so the fully qualified path is just "compaq" and the URL is valid:
    INSERT INTO files VALUES (9,9,'file://Compaq/FTQ/00000003.pdf',NULL,NULL);
    INSERT INTO files VALUES (13,13,'file://Compaq/FTQ/01.txt',NULL,NULL);
    CREATE INDEX file_index ON files(path) INDEXTYPE IS ctxsys.context
    PARAMETERS ('datastore ctxsys.URL_DATASTORE format column ot_format');
    but when I enter:
    Select * from CTX_User_Index_errors, I see the following errors:
    DRG-11609: URL store: unable to open local file specified by file://Compaq/FTQ/00000003.pdf
    DRG-11609: URL store: unable to open local file specified by file://Compaq/FTQ/01.txt
    Did I miss something?
    Do I need to install anything on the file server?
    I would like to convince my company that Oracle can be much quicker than Microsoft's Indexing Service because it can avoid joining two large result sets (one result set from Full_text (indexing service) and one for specific data contained in fields in the MS-SQL database.) Full Text Searches commonly take 40 - 60 seconds where there are 1.5 million multi-page PDF files for a particular set that I sample search on. Without this massive join, I believe I can get the search to run in under 10 seconds.

    Thank you!
    File_Datastore worked fine.
    I was staying away from File_Datastore because the information I gathered from googling suggested that file_datastore would only work locally.
    Now I just have to get Oracle to pull data out of tables in a MS-SQL database on the local network (don't have a clue yet), and then have it index compiled file paths.
    Then MS-SQL can query Oracle with index and full-text criteria and Oracle can send back a result set
    It may sound like a bad way of performing Full-Text Queries, but anything will be better than the way things are currently running. We are currently performing Full Text Searches on a table that is rebuilt nightly, so the table containing millions of file paths is not live..
    It would be so much better if we just migrated to Oracle, but we currently do not have the resources.

  • DRG-50857 and ORA-12838 error while INDEXTYPE IS CTXSYS.CONTEXT

    Hi Experts,
    I've been encountering an issue while creating INDEX.
    If I execute the below script from SQLDEVELOPER line by line, then the index gets created but the weirdest thing is, if I executed the same as one sql file from SQLPLUS or SQLDEVELOPER, I get the error shared below. As we need to deliver as one sql file to customer, how can we fix this issue?
    Below is the content of my sql file
    ALTER SESSION ENABLE PARALLEL DML;
    ALTER SESSION FORCE PARALLEL QUERY;
    CREATE INDEX APPS.TEST_N1 ON APPS.EMP_TABLE
        EMP_NAME
      INDEXTYPE IS CTXSYS.CONTEXT PARALLEL 32;
    ALTER INDEX APPS.TEST_N1 NOPARALLEL;
    COMMIT;
    Below is the error
    Session altered.
    Elapsed: 00:00:00.00
    Session altered.
    Elapsed: 00:00:00.00
    CREATE INDEX APPS.TEST_N1 ON APPS.EMP_TABLE
    ERROR at line 1:
    ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
    ORA-20000: Oracle Text error:
    DRG-50857: oracle error in dripref.set_preferences
    ORA-12838: cannot read/modify an object after modifying it in parallel
    ORA-06512: at "CTXSYS.DRUE", line 160
    ORA-06512: at "CTXSYS.TEXTINDEXMETHODS", line 366
    Elapsed: 00:00:02.82
    Index altered.
    Elapsed: 00:00:00.01
    Commit complete.

    I get the same error in 11g, as shown below, but not in 12c, as shown below that.  So, it looks like there has been a change in the way that Oracle Text does things between versions.  When you create an Oracle Text Context index, it creates some domain index tables.  Apparently there is some change involved behind the scenes in the dripref.set_preferences procedure that perhaps does an append or some such thing.  If you post this question in the Text space/sub-forum, with a link to this thread, you may get a more detailed explanation and perhaps a workaround from Oracle Text product manager Roger Ford or others.  Or, perhaps some moderator will move this thread there.
    SCOTT@orcl> SELECT banner FROM v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE    11.2.0.1.0    Production
    TNS for 64-bit Windows: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    5 rows selected.
    SCOTT@orcl> CREATE TABLE emp_table AS SELECT ename emp_name FROM emp;
    Table created.
    SCOTT@orcl> ALTER SESSION ENABLE PARALLEL DML;
    Session altered.
    SCOTT@orcl> ALTER SESSION FORCE PARALLEL QUERY;
    Session altered.
    SCOTT@orcl> CREATE INDEX SCOTT.TEST_N1 ON SCOTT.EMP_TABLE
      2    (
      3       EMP_NAME
      4    )
      5    INDEXTYPE IS CTXSYS.CONTEXT PARALLEL 32;
    CREATE INDEX SCOTT.TEST_N1 ON SCOTT.EMP_TABLE
    ERROR at line 1:
    ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
    ORA-20000: Oracle Text error:
    DRG-50857: oracle error in dripref.set_preferences
    ORA-12838: cannot read/modify an object after modifying it in parallel
    ORA-06512: at "CTXSYS.DRUE", line 160
    ORA-06512: at "CTXSYS.TEXTINDEXMETHODS", line 366
    SCOTT@orcl> ALTER INDEX SCOTT.TEST_N1 NOPARALLEL;
    Index altered.
    SCOTT@orcl> COMMIT;
    Commit complete.
    SCOTT@orcl12c> SELECT banner FROM v$version;
    BANNER
    Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
    PL/SQL Release 12.1.0.1.0 - Production
    CORE    12.1.0.1.0    Production
    TNS for 64-bit Windows: Version 12.1.0.1.0 - Production
    NLSRTL Version 12.1.0.1.0 - Production
    5 rows selected.
    SCOTT@orcl12c> CREATE TABLE emp_table AS SELECT ename emp_name FROM emp;
    Table created.
    SCOTT@orcl12c> ALTER SESSION ENABLE PARALLEL DML;
    Session altered.
    SCOTT@orcl12c> ALTER SESSION FORCE PARALLEL QUERY;
    Session altered.
    SCOTT@orcl12c> CREATE INDEX SCOTT.TEST_N1 ON SCOTT.EMP_TABLE
      2    (
      3       EMP_NAME
      4    )
      5    INDEXTYPE IS CTXSYS.CONTEXT PARALLEL 32;
    Index created.
    SCOTT@orcl12c> ALTER INDEX SCOTT.TEST_N1 NOPARALLEL;
    Index altered.
    SCOTT@orcl12c> COMMIT;
    Commit complete.

  • Recreating indexes of type: ctxsys.context

    For a database on Oracle 10g, I need to output a script that recreates all indexes of type of ctxsys.context type. I can do it running this query:
    SELECT owner, index_name, DBMS_METADATA.get_ddl('INDEX', index_name, owner)
    FROM all_indexes
    WHERE ityp_owner = 'CTXSYS' AND ityp_name = 'CONTEXT';However, if an index has parameters like this:
    CREATE INDEX <MySchema>.<Index_name> ON <MySchema>.<Index_name>
    (BL_RESOLUCION)
    INDEXTYPE IS CTXSYS.CONTEXT
    PARAMETERS('sync (every "FREQ=DAILY; BYHOUR=1")')
    NOPARALLEL;If I run DBMS_METADATA.get_ddl function, I get this output script:
    CREATE INDEX <MySchema>.<Index_name> ON <MySchema>.<Index_name>
    (BL_RESOLUCION)
    INDEXTYPE IS CTXSYS.CONTEXT;How to include the parameter line?
    Edited by: user521219 on 06-nov-2012 9:55

    >
    For a database on Oracle 10g, I need to output a script that recreates all indexes of type of ctxsys.context type. I can do it running this query:
    SELECT owner, index_name, DBMS_METADATA.get_ddl('INDEX', index_name, owner)
    FROM all_indexes
    WHERE ityp_owner = 'CTXSYS' AND ityp_name = 'CONTEXT';
    However, if an index has parameters like this:
    CREATE INDEX <MySchema>.<Index_name> ON <MySchema>.<Index_name>
    (BL_RESOLUCION)
    INDEXTYPE IS CTXSYS.CONTEXT
    PARAMETERS('sync (every "FREQ=DAILY; BYHOUR=1")')
    NOPARALLEL;
    If I run DBMS_METADATA.get_ddl function, I get this output script:
    CREATE INDEX <MySchema>.<Index_name> ON <MySchema>.<Index_name>
    (BL_RESOLUCION)
    INDEXTYPE IS CTXSYS.CONTEXT;
    How to include the parameter line?
    >
    When you post always provide your 4 digit Oracle version (result of SELECT * FROM V$VERSION); 10g is not a version.
    Works for me on Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
      CREATE INDEX "SCOTT"."NDX_TEST_CONTEXT" ON "SCOTT"."DEPT" ("DNAME")
       INDEXTYPE IS "CTXSYS"."CONTEXT" PARAMETERS ('sync (every "FREQ=DAILY; BYHOUR=1")')Post information about which user is running that query and which user owns the index that is giving the problem.
    Have you tried the query using a DBA user?

  • Error while running the Oracle Text optimize index procedure (even as a dba user too)

    Hi Experts,
    I am on Oracle on 11.2.0.2  on Linux. I have implemented Oracle Text. My Oracle Text indexes are fragmented but I am getting an error while running the optimize_index error. Following is the error:
    begin
      ctx_ddl.optimize_index(idx_name=>'ACCESS_T1',optlevel=>'FULL');
    end;
    ERROR at line 1:
    ORA-20000: Oracle Text error:
    ORA-06512: at "CTXSYS.DRUE", line 160
    ORA-06512: at "CTXSYS.CTX_DDL", line 941
    ORA-06512: at line 1
    Now I tried then to run this as DBA user too and it failed the same way!
    begin
      ctx_ddl.optimize_index(idx_name=>'BVSCH1.ACCESS_T1',optlevel=>'FULL');
    end;
    ERROR at line 1:
    ORA-20000: Oracle Text error:
    ORA-06512: at "CTXSYS.DRUE", line 160
    ORA-06512: at "CTXSYS.CTX_DDL", line 941
    ORA-06512: at line 1
    Now CTXAPP role is granted to my schema and still I am getting this error. I will be thankful for the suggestions.
    Also one other important observation: We have this issue ONLY in one database and in the other two databases, I don't see any problem at all.
    I am unable to figure out what the issue is with this one database!
    Thanks,
    OrauserN

    How about check the following?
    Bug 10626728 - CTX_DDL.optimize_index "full" fails with an empty ORA-20000 since 11.2.0.2 upgrade (DOCID 10626728.8)

  • Oracle Text ALTER INDEX Performance

    Greetings,
    We have encountered some ehancement issues with Oracle Text and really need assistance.
    We are using Oracle 9i (Release 9.0.1) Standard Edition
    We are using a very simple Oracle text environmet, with CTXSYS.CONTEXT indextype on Domain Indexes.
    We have indexed two text columns in one table, one of these columns is CLOB.
    Currently if one of these columns is modified, we are using a trigger to automatically ALTER the index.
    This is very slow, it is just like dropping the index and creating it again.
    Is this right? should it be this slow?
    We are also trying to use the ONLINE parameter for ALTER INDEX and CREATE INDEX, but it gives an error saying this feature is not enabled.
    How can we enable it?
    Is there any way in improving the performance of this automatic update of the indexes?
    Would using a trigger be the best way to do this?
    How can we optimize it to a more satifactory performance level?
    Also, are we able to use the language lexers for indexes with the Standard Edition. If so, how do you enable the CTX_DLL?
    Many thanks for any assistance.
    Chi-Shyan Wang

    If you are going to sync your index on every update, you need to make sure that you are optmizing it on a regular basis to remove index fragmentation and remove deleted rows.
    you can set up a dmbs_job to do a ctx_ddl.optmize and run a full optmize periodically.
    Also, depending on the number of rows you have, and also the size of the data, you might want to look at using a CTXCAT index, which is transactional, stays in sync automatically and does not need to be optimized. CTXCAT indexes do not work well on large text objects (they are good for a couple lines of text at most) so they may not suit your dataset.

  • Indextype is ctxsys.context

    hi all,
    i've a problem with index with ctxsys.context index
    i created it on a table has a field (description of a certain component)
    the field's type is VARCHAR2(256)
    The query performed is
    select count(*) from Loaded_Table_Test
    where contains(F8,'%Resistor%') > 0;
    it returns many records
    THE PROBLEM IS
    after many days of perfoming the same query it seems like its
    not working :the query returns nothing
    I wounder if anybody can help me,Thanks in advance
    Rasha Fayez

    Does it return an error message? If you're doing this in a application,
    try it in SQL*Plus to see.
    Most likely reason for this is that you're getting "query too complex".
    This could start happening, even though the query used to work, if more records
    have been added to the table and therefore increased the number of
    expansions for '%resistor%'.
    Double truncation like this is not generally a good idea. Even if you don't
    get the 'query too complex error', the query will perform poorly unless you
    have the SUBSTRING_INDEX option in use.
    - Roger

  • APEX app using Oracle Text  to index pages that require authorzation

    Hi Gurus and APEX Dev team
    My team need to develop an APEX App that will index all our documents spread across various servers. Some of the documents require Single sign on access (e.g. KIX.oraclecorp.com) and some require other authorization methods (e.g. Metalink) . The Question is , Is it possible to index the pages that require authorization using Oracle text. If yes How? I have implemented the demo app which can index pages that do not require authorization.
    Thanks a million
    regards
    Bala

    Hello,
    Unless I misunderstand you, the fact that the pages require authentication doesn't really matter, it is the underlying data you want to index correct? If so then you would index them in exactly the same way that you would index any table data using Oracle Text/interMedia.
    John.
    Blog: http://jes.blogs.shellprompt.net
    Work: http://www.apex-evangelists.com
    Author of Pro Application Express: http://tinyurl.com/3gu7cd
    REWARDS: Please remember to mark helpful or correct posts on the forum, not just for my answers but for everyone!

  • Ctxsys.context index on registered schema xmltype column

    9iR2
    Is it possible to create a text index (indextype is ctxsys.context) on a schema registered xmltype column?
    I tried it, the index creation works fine.
    After the first insert statement the Oracle process seems to hang. (CPU 100%, increasing memory consumption)

    Yes, I previously entered some data.
    Test case:
    1. register schema
    begin
    DBMS_XMLSCHEMA.REGISTERSCHEMA('http://localhost/JobPositionSeeker-1_1.xsd',
    getDocument('JobPositionSeeker-1_1.xsd'), TRUE, TRUE, FALSE, FALSE
    end;
    2. create table
    CREATE TABLE application_xml of XMLType
    XMLSCHEMA "http://localhost/JobPositionSeeker-1_1.xsd" ELEMENT "JobPositionSeeker"
    3. entered some data
    4. created the index
    create index applicant on application_xml ( SYS_NC_ROWINFO$)
    indextype is ctxsys.context
    5. select using index
    select value(a).getClobVal() from application_xml a
    where contains( value(a),'%ai% INPATH(//PersonalData/PersonName/FamilyName)')>0
    6. insert another record
    -> crash

  • About ORacle  Text

    Hi,
    I would like to know some points about oracle Text.
    I have used oracle Text to extract just the text contents from blobs(of pdf,xls,..) stored in the database.
    1) Whether the same Oracle text can be used to extract the contents from the file?(so that i can store the text in database instead of blobs)
    2) What is the main area we use ORacle Text?
    Thnks

    Oracle text is mainly used to search in large sized text columns like clob, varchar2(4000) etc.
    The LIKE search hits performance if tried to search on such columns, this new feature oracle text gives good performance on search.
    Oracle text creates index on such columns.
    You may find more details at http://www.stanford.edu/dept/itss/docs/oracle/10g/text.101/b10730.pdf

  • Problem full-text in blob column index created using Oracle Text

    Hi,
    I'm running Oracle Database 10g 10.2 on solaris
    I configure Oracle text if i look for in a varchar2 column is ok, but with blob column doesn't works the search.
    I have a table with a blob column which contains document. I load document with Oracle UCM (stellent)
    My index scripts is:
    CREATE INDEX ORAUCM.FT_IDCCOLL1 ON ORAUCM.IDCCOLL1
    (DDOCFULLTEXT)
    INDEXTYPE IS CTXSYS.CONTEXT
    PARAMETERS('DATASTORE CTXSYS.DEFAULT_DATASTORE FILTER CTXSYS.AUTO_FILTER FORMAT COLUMN DFULLTEXTFORMAT CHARSET
    COLUMN DFULLTEXTCHARSET LEXER OCS_IDCCOLL1_LEXER SYNC (ON COMMIT)')
    NOPARALLEL;
    And my select retunm 0 rows although it will be many documents:
    SELECT IdcColl2.dID, dDocName, dDocTitle, dDocType, dRevisionID, dSecurityGroup, dDocAuthor,
    dDocAccount, dRevLabel, dFormat, dOriginalName, dExtension, dWebExtension, dInDate, dOutDate,
    dPublishType, dRendition1, dRendition2, VaultFileSize, WebFileSize, URL, dFullTextFormat,
    dFullTextCharset, DocMeta.*
    FROM IdcColl1, DocMeta
    WHERE IdcColl1.dID=DocMeta.dID AND (CONTAINS(dDocFullText,'SUBIR') > 0 )
    ORDER BY dInDate Desc
    Thanks in advance.

    Thank you for your answer.
    I response your question:
    - yes DDOCFULLTEXT is a BLOB column.
    - The document that word, excels, whatever. We load the document with UCM (universal Content Management)
    because i need full-test search form UCM tool.
    - Yes 'subir' containts in the word document.
    - select * from CTX_USER_INDEX_ERRORS ;
    No rows returned.
    - SELECT TOKEN_TEXT FROM DR$FT_IDCCOLL1$I
    No rows returned.
    - I tried create symplifying index and doen't work.
    I tried create table and index context on oracle 10.2.0.3 (test database)and works ok.
    I compared both context (test database and ucm database) and i saw a difference:
    In ucm database there are these preferences "analyze text"
    BEGIN ctx_ddl.create_preference('ORAUCM.', 'WORLD_LEXER'); end;
    BEGIN ctx_ddl.create_preference('ORAUCM.', 'DETAIL_DATASTORE'); end;
    I don't know if is important diference or no.
    Please if you need more information, tell me.
    Thanks for your time.

  • Problem with blob column index created using Oracle Text.

    Hi,
    I'm running Oracle Database 10g 10.2.0.1.0 standard edition one, on windows server 2003 R2 x64.
    I have a table with a blob column which contains pdf document.
    Then, I create an index using the following script so that I can do fulltext search using Oracle Text.
    CREATE INDEX DMCS.T_DMCS_FILE_DF_FILE_IDX ON DMCS.T_DMCS_FILE
    (DF_FILE)
    INDEXTYPE IS CTXSYS.CONTEXT
    PARAMETERS('DATASTORE CTXSYS.DEFAULT_DATASTORE');
    However, the index is not searchable and I check the following tables created by database for my index and found them to be empty as well !!
    DR$T_DMCS_FILE_DF_FILE_IDX$I
    DR$T_DMCS_FILE_DF_FILE_IDX$K
    DR$T_DMCS_FILE_DF_FILE_IDX$N
    DR$T_DMCS_FILE_DF_FILE_IDX$R
    I wonder what's wrong with it.
    My user has been granted the ctx_app role and I have other tables that store plain text which I use Oracle Text are fine. I even output the blob column and save as pdf file and they are fine.
    However the database seems like not indexing my blob column although the index can be created without error.
    Please advise.
    Really appreciate anyone who can help.
    Thank you.

    The situation is I have already loaded a few pdf document into the table's blob column.
    After I create the Oracle text index on this blob column, I find the system generated index tables listed in my earlier posting are empty, except for the 4th table.
    Normally we'll see words inside the table where those are the words indexed by oracle text on my document.
    As a result, no matter how i search for the index using select statement with contains operator, it will not give me any result.
    I feel weird why the blob is not indexed. The content of the blob are actually valid because I tested this by export the content back to pdf and I can still view and search within the pdf.
    Regards,
    Jap.

  • Create Oracle Text Index from Java via JDBC

    Hi, I have a question relevant to creation of the Text Index in Oracle Text via Java JDBC.
    In Java I create client application and I connect to remote Oracle server. (there is Oracle
    10g Enterprise Edition 10.2.0.3.0 on Debian Linux OS). In Java I create query:
    CREATE INDEX index_name ON source_tab(text) indextype is ctxsys.context
    parameters('datastore ctxsys.file_datastore filter ctxsys.null_filter');
    and I start it by:
    PreparedStatement stmt = db.prepareStatement(query);
    ResultSet rs = stmt.executeQuery();
    There is problem that Text Index is created empty and when I write out error log then:
    DRG-11513: unable to open or write to file "path"
    I have on my computer Oracle XE 10g (Windows XP OS) here this application in Java functions
    without problems. Without problems it´s with that same query in SQLPlus when I connect at
    this remote Oracle server via PuTTY.
    Do you know anybody where could be error? Or at worst case where find I more detailed
    manual about JDBC Oracle mainly possible errors and problems with compatibility?

    Does it work if you don't use "file_datastore"?
    Eg. try the following in sqlplus:
    create table t (text varchar2(2000));
    insert into t values ('hello world');
    create index ti on t(text) indextype is ctxsys.context;
    select * from t where contains (text, 'hello') > 0;
    Then drop the index ti and try the same "create index" through JDBC. Does that work?
    If so, then we have some kind of issue with the file_datastore. I assume you are aware that the file will be read by the SERVER, not from the client?
    So if your database resides on a Linux box, but you are calling from a Java program on a windows PC, the file names in source_tab(text) must be in Linux format, and must refer to files which are available on the Linux server (and readable by the owner of the Oracle database process).
    So /home/me/file.txt might work, but C:\Documents\file.txt will not.

  • Oracle text performance with context search indexes

    Search performance using context index.
    We are intending to move our search engine to a new one based on Oracle Text, but we are meeting some
    bad performance issues when using search.
    Our application allows the user to search stored documents by name, object identifier and annotations(formerly set on objects).
    For example, suppose I want to find a document named ImportSax2.c: according to user set parameters, our search engine format the following
    search queries :
    1) If the user explicitely ask for a search by document name, the query is the following one =>
         select objid FROM ADSOBJ WHERE CONTAINS( OBJFIELDURL , 'ImportSax2.c WITHIN objname' , 1 ) > 0;
    2) If the user don't specify any extra parameters, the query is the following one =>
         select objid FROM ADSOBJ WHERE CONTAINS( OBJFIELDURL , 'ImportSax2.c' , 1 ) > 0;
    Oracle text only need around 7 seconds to answer the second query, whereas it need around 50 seconds to give an answer for the first query.
    Here is a part of the sql script used for creating the Oracle Text index on the column OBJFIELDURL
    (this column stores a path to an xml file containing properties that have to be indexed for each object) :
    begin
    Ctx_Ddl.Create_Preference('wildcard_pref', 'BASIC_WORDLIST');
    ctx_ddl.set_attribute('wildcard_pref', 'wildcard_maxterms', 200) ;
    ctx_ddl.set_attribute('wildcard_pref','prefix_min_length',3);
    ctx_ddl.set_attribute('wildcard_pref','prefix_max_length',6);
    ctx_ddl.set_attribute('wildcard_pref','STEMMER','AUTO');
    ctx_ddl.set_attribute('wildcard_pref','fuzzy_match','AUTO');
    ctx_ddl.set_attribute('wildcard_pref','prefix_index','TRUE');
    ctx_ddl.set_attribute('wildcard_pref','substring_index','TRUE');
    end;
    begin
    ctx_ddl.create_preference('doc_lexer_perigee', 'BASIC_LEXER');
    ctx_ddl.set_attribute('doc_lexer_perigee', 'printjoins', '_-');
    ctx_ddl.set_attribute('doc_lexer_perigee', 'BASE_LETTER', 'YES');
    ctx_ddl.set_attribute('doc_lexer_perigee','index_themes','yes');
    ctx_ddl.create_preference('english_lexer','basic_lexer');
    ctx_ddl.set_attribute('english_lexer','index_themes','yes');
    ctx_ddl.set_attribute('english_lexer','theme_language','english');
    ctx_ddl.set_attribute('english_lexer', 'printjoins', '_-');
    ctx_ddl.set_attribute('english_lexer', 'BASE_LETTER', 'YES');
    ctx_ddl.create_preference('german_lexer','basic_lexer');
    ctx_ddl.set_attribute('german_lexer','composite','german');
    ctx_ddl.set_attribute('german_lexer','alternate_spelling','GERMAN');
    ctx_ddl.set_attribute('german_lexer','printjoins', '_-');
    ctx_ddl.set_attribute('german_lexer', 'BASE_LETTER', 'YES');
    ctx_ddl.set_attribute('german_lexer','NEW_GERMAN_SPELLING','YES');
    ctx_ddl.set_attribute('german_lexer','OVERRIDE_BASE_LETTER','TRUE');
    ctx_ddl.create_preference('japanese_lexer','JAPANESE_LEXER');
    ctx_ddl.create_preference('global_lexer', 'multi_lexer');
    ctx_ddl.add_sub_lexer('global_lexer','default','doc_lexer_perigee');
    ctx_ddl.add_sub_lexer('global_lexer','german','german_lexer','ger');
    ctx_ddl.add_sub_lexer('global_lexer','japanese','japanese_lexer','jpn');
    ctx_ddl.add_sub_lexer('global_lexer','english','english_lexer','en');
    end;
    begin
         ctx_ddl.create_section_group('axmlgroup', 'AUTO_SECTION_GROUP');
    end;
    drop index ADSOBJ_XOBJFIELDURL force;
    create index ADSOBJ_XOBJFIELDURL on ADSOBJ(OBJFIELDURL) indextype is ctxsys.context
    parameters
    ('datastore ctxsys.file_datastore
    filter ctxsys.inso_filter
    sync (on commit)
    lexer global_lexer
    language column OBJFIELDURLLANG
    charset column OBJFIELDURLCHARSET
    format column OBJFIELDURLFORMAT
    section group axmlgroup
    Wordlist wildcard_pref
    Oracle created a table named DR$ADSOBJ_XOBJFIELDURL$I which now contains around 25 millions records.
    ADSOBJ is the table contaings information for our documents,OBJFIELDURL is the field that contains the path to the xml file containing
    data to index. That file looks like this :
    <?xml version="1.0" encoding="UTF-8" ?>
    <fields>
    <OBJNAME><![CDATA[NomLnk_177527o.jpgp]]></OBJNAME>
    <OBJREM><![CDATA[Z_CARACT_141]]></OBJREM>
    <OBJID>295926o.jpgp</OBJID>
    </fields>
    Can someone tell me how I can make that kind of request
    "select objid FROM ADSOBJ WHERE CONTAINS( OBJFIELDURL , 'ImportSax2.c WITHIN objname' , 1 ) > 0;"
    run faster ?

    Below are the execution plan for both the 2 requests :
    select objid FROM ADSOBJ WHERE CONTAINS( OBJFIELDURL , 'ImportSax2.c WITHIN objname' , 1 ) > 0
    PLAN_TABLE_OUTPUT
    |     Id     | Operation                              |Name                         |Rows     |Bytes     |Cost (%CPU)|
    |     0     | SELECT STATEMENT                    |                              |1272     |119K     |     4     (0)     |
    |     1      | TABLE ACCESS BY INDEX ROWID     |ADSOBJ      |1272     |119K     |     4     (0)     |
    |     2      |     DOMAIN INDEX                    |ADSOBJ_XOBJFIELDURL     |          |          |     4     (0)     |
    Note
    - 'PLAN_TABLE' is old version
    Executed in 2 seconds
    select objid FROM ADSOBJ WHERE CONTAINS( OBJFIELDURL , 'ImportSax2.c' , 1 ) > 0
    PLAN_TABLE_OUTPUT
    |     Id     |Operation                              |Name                         |Rows     |Bytes     |Cost (%CPU)|
    |     0     | SELECT STATEMENT                    |                              |1272     |119K     |     4     (0)     |
    |     1     | TABLE ACCESS BY INDEX ROWID     |ADSOBJ                         |1272     |119K     |     4     (0)     |
    |     2     | DOMAIN INDEX                    |ADSOBJ_XOBJFIELDURL     |          |          |     4     (0)     |
    Sorry for the result formatting, I can't get it "easily" readable :(

Maybe you are looking for

  • How do I use my bluetooth for my Hp ENVY 17?

    Hello to the reader. My name is Kervin and I really wanna know if its possible to activate my bluetooth in my Hp Envy. If its possible, please give a steps by step instruction on how to do it.  Tried searching but the answers werent helpful. THnkas a

  • Problem in lsmw idoc method

    Hi all, iam uploading material master data(MATMAS) using Idoc method, iam getting the I doc status as 51(i.e document is not posted) when i checked the error it is giving the error as material number is not entered ........ can any one help on this.

  • Wrong class version

    Hi, I am trying to copmile and run AppFuse https://appfuse.dev.java.net/ in Eclipse, but am getting a wrong class version error: F:\...\Constants.java:20: cannot access java.lang.Object [javac] bad class file: C:\jre1.5.0_02\lib\rt.jar(java/lang/Obje

  • Sync email calender contacts

    My iPhone 3G is set up to sync with my microsoft Exchange 2003. It sync allright the calenders and contacts and email UNTILL i turn off the iPhone. When i turn it on again it will not sync the email but it syncs the calendres and contact - anyone kno

  • My address book on mac air (lion osx) won't open

    I took my macbook air and iPhone into apple store to get help in updating iPhone to 5.1 and to merge everything in iCloud and drop mobileme Not sure what happened during the meeting with the genius....but, my address book on my mac air won't open....