Ctx_ddl.sync_index problem

Hi,
When I try to use the ctx_ddl.syn_index procedure to synchronize index I've got the following error:
ERROR at line 1:
ORA-20000: Oracle Text error:
DRG-50857: oracle error in drekalc
ORA-06502: PL/SQL: numeric or value error: character to number conversion error
ORA-06512: at "CTXSYS.DRIXMD", line 1137
ORA-01426: numeric overflow
ORA-06512: at "CTXSYS.DRVXMD", line 206
ORA-06512: at line 1
ORA-06512: at "CTXSYS.DRUE", line 160
ORA-06512: at "CTXSYS.CTX_DDL", line 649
ORA-06512: at line 1
So I turned on the 10046 event to see what exactly the cause of the error. And in the trace file I find the following interesting code:
PARSING IN CURSOR #6 len=56 dep=1 uid=47 oct=47 lid=47 tim=1254155812380556 hv
begin ctxsys.drvxmd.AllocateDocids(:1, :2, :3, :4); end;
END OF STMT
PARSE #6:c=0,e=0,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=1,plh=0,tim=1254155812380556
BINDS #6:
Bind#0
oacdty=02 mxl=22(22) mxlc=00 mal=00 scl=00 pre=00
oacflg=00 fl2=0000 frm=00 csi=00 siz=96 off=0
kxsbbbfp=00c33b8c bln=22 avl=03 flg=05
value=3268
Bind#1
oacdty=02 mxl=22(22) mxlc=00 mal=00 scl=00 pre=00
oacflg=00 fl2=0000 frm=00 csi=00 siz=0 off=24
kxsbbbfp=00c33ba4 bln=22 avl=01 flg=01
value=0
Bind#2
oacdty=02 mxl=22(22) mxlc=00 mal=00 scl=00 pre=00
oacflg=00 fl2=0000 frm=00 csi=00 siz=0 off=48
kxsbbbfp=00c33bbc bln=22 avl=04 flg=01
value=152253
Bind#3
oacdty=02 mxl=22(22) mxlc=00 mal=00 scl=00 pre=00
oacflg=00 fl2=0000 frm=00 csi=00 siz=0 off=72
kxsbbbfp=00c33bd4 bln=22 avl=00 flg=01
=====================
PARSING IN CURSOR #8 len=61 dep=2 uid=48 oct=3 lid=48 tim=1254155812380556 hv=2>
SELECT IDX_NEXTID FROM DR$INDEX WHERE IDX_ID = :B1 FOR UPDATE
END OF STMT
PARSE #8:c=1000,e=0,p=0,cr=0,cu=0,mis=1,r=0,dep=2,og=1,plh=0,tim=12541558123805>
BINDS #8:
Bind#0
oacdty=02 mxl=22(22) mxlc=00 mal=00 scl=00 pre=00
oacflg=03 fl2=1206001 frm=00 csi=00 siz=24 off=0
kxsbbbfp=00fee97c bln=22 avl=03 flg=05
value=3268
EXEC #8:c=2999,e=0,p=1,cr=2,cu=3,mis=1,r=0,dep=2,og=1,plh=2404769607,tim=125415>
FETCH #8:c=0,e=0,p=0,cr=0,cu=0,mis=0,r=1,dep=2,og=1,plh=2404769607,tim=12541558>
STAT #8 id=1 cnt=1 pid=0 pos=1 obj=0 op='FOR UPDATE (cr=2 pr=1 pw=0 time=0 us)'
STAT #8 id=2 cnt=1 pid=1 pos=1 obj=66881 op='TABLE ACCESS BY INDEX ROWID DR$IND>
STAT #8 id=3 cnt=1 pid=2 pos=1 obj=66882 op='INDEX UNIQUE SCAN DRC$IDX_KEY (cr=>
CLOSE #8:c=0,e=0,dep=2,type=3,tim=1254155812380556
EXEC #6:c=13998,e=231027,p=1,cr=2,cu=3,mis=0,r=0,dep=1,og=1,plh=0,tim=125415581>
ERROR #6:err=6502 tim=1254155812611583
Then I checked ctxsys.drvxmd.AllocateDocids procedure
SQL> desc ctxsys.drvxmd
PROCEDURE ALLOCATEDOCIDS
Argument Name Type In/Out Default?
P_IDXID BINARY_INTEGER IN
P_IXPID BINARY_INTEGER IN
P_ALLOCSZ BINARY_INTEGER IN
P_STARTID BINARY_INTEGER OUT
and executed SELECT IDX_NEXTID FROM DR$INDEX WHERE IDX_ID = 3268 statement to see what this query returned
SQL> SELECT IDX_NEXTID FROM DR$INDEX WHERE IDX_ID =3268;
IDX_NEXTID
2147497630
I think that a main reason of the error that procedure AllocateDocids tries to return this value through P_STARTID parameter or use this variable to store a value from the above-mentioned query. As appears from documentation the limit of BINARY_INTEGER is 2147483647, so we have exception "numeric overflow".
Is I am right in conclusions? If yes, is there any workaround to eliminate this error?
Thanks.

I would appear you've exceeded the docid limit of 2 billion. That can only happen if you have more than 2 billion rows added or updated in your table.
Is this likely? Is this a very highly-used table with a huge number of updates?
The only solution here is to rebuild the index so that allocates new docid values throughout. If the table is large, that obviously could take a while. Is this 11g? If so you can use the "recreate index offline" feature.

Similar Messages

  • Trigger calling ctx_ddl.sync_index problem

    Dear,
    In order to keep my context indexes up-to-date, I'm trying to write a trigger calling this PL/SQL procedure on update/insert/delete statement.
    However, there must be a problem in my trigger definition since it gives compilation errors! I don't see what 's wrong!
    This is my trigger definition:
    =========BEGIN==================
    create or replace trigger update_lexicon_expl_nl after insert or delete or update on lexicon begin execute ctx_ddl.sync_index('lexicon_expl_nl'); end;
    =========END===================
    The compilation error is something like:
    "Encountered ctx_ddl when expecting one of the following :=.(@;immediate"
    PS. calling 'execute ctx_ddl.sync('myindex') in SQL Plus is workigng OK
    Please help.
    Dirk

    You do not need to trigger that table,there are two way to 'update' index.
    1.Alter index your_index_name rebuild.
    2.Set up background DML process, which need you work with an DBA or you have ctxsys role.

  • Will frequent execution of CTX_DDL.SYNC_INDEX causes slow performance

    Hi:
    We currently execute CTX_DDL.SYNC_INDEX every 5 mins (using a DBMS_JOB) to synchronize oracle text indexes on VARCHAR2 columns. We are planning on increasing the frequency to 1 min. It looks like performance will not be impacted based on the information in http://download.oracle.com/docs/html/A95995_01/oraclete.htm.
    My question is has anyone seen database performance problems after increasing the frequency of sync_index.
    Thanks!

    Hi,
    our load is not that big, about 1500 new documents (stored in blob) and about 250 updates on documents. The size varies between 2k and 50MB. Even the biggest one goes fast although "Sync on commit". About 10 seconds to insert and index. BTW running on AIX 5.3 and Oracle 10.2.0.3. What helps in this indexing that we made the parameter for memory for text indexes increased to 128MB.
    Herald ten Dam
    Superconsult.nl

  • Calling CTX_DDL.SYNC_INDEX Package but reflected

    Hi All,
    I have a table Customer_Tif_Detail which is having   9383428 rows:
    select count(*) from Customer_Tif_Detail;
    COUNT(*)
    9383428
    And I have a query which taking too much time to execute, below is teh query:
    Select  ZIP_STATUS From Customer_Tif_Detail Ctd Where Ctd.Tif_Name Like '%231079_0068.tif%'
    AND 0= ( select count(*) as CNT From Customer_Document_Detail Cdd Where Cdd.Tif_End Is Null
    And cdd.id = ctd.id AND Cdd.Submit_Flag = 'Y');
    Then I created a Index Type Index, below is the process I did:
    BEGIN
         CTX_DDL.CREATE_PREFERENCE ('tif_details', 'BASIC_LEXER');
        CTX_DDL.SET_ATTRIBUTE ('tif_details', 'PRINTJOINS', '_.');
       END;
    CREATE INDEX idx_customer_tif_name ON Customer_Tif_Detail(tif_name) INDEXTYPE IS CTXSYS.CONTEXT
       PARAMETERS ('LEXER tif_details');
    And I am using below query with using contains, below is query:
    Select  ZIP_STATUS From Customer_Tif_Detail Ctd Where Ctd.Tif_Name contains(tif_name, '%231079_0068.tif%' )
    AND 0= ( select count(*) as CNT From Customer_Document_Detail Cdd Where Cdd.Tif_End Is Null
    And cdd.id = ctd.id AND Cdd.Submit_Flag = 'Y');
    Now its working fine, but when I check from below query them I am gettimg lot of missing data from index:
    select count(*) from dr$IDX_TIF_NAME_CTX$i;
    COUNT(*)
    7953605
    Even I used below CTX_DDL.SYNC_INDEX package to do syncronization even I am getting same records:
       call CTX_DDL.SYNC_INDEX('idx_customer_tif_name', '1073741824');
    what I am missing here to do proper syncronization between index and original data?
    and how miuch memory I need to apply after some insertion goes on Customer_Tif_Detail table to syncronization  index on CTX_DDL.SYNC_INDEX package?
    Thanks

    What is the result of;
    select count(DISTINCT tif_name) from Customer_Tif_Detail;

  • CTX_DDL.SYNC_INDEX  gives ORA-03113 error

    I am trying to use the CTX_DDL.SYNC_INDEX command in order to update the full Text Index on a table, which contains a word document as a binary object, but I get an ORA-03113 error every time I do this. I get the same error if the table contains an Excel file. It works perfectly OK if the table contains simple text files.

    Hi Barbara - thanks for your response.
    In answer to your questions;
    Oracle version is 9.2.0.1.0
    Table structure is created with following sql;
    CREATE TABLE DOCUMENTFILE
         (DOCUMENTFILEID      NUMBER (10,0) NOT NULL,
         DATA                LONG RAW,
         FILE_SIZE           NUMBER (10,0),
         FILENAME           VARCHAR2 (510),
         ENCRYPTIONKEY           VARCHAR2 (100),
         VALIDATIONKEY           VARCHAR2 (100),
         MIMETYPE           VARCHAR2 (255),
         FILEEXTENSION           CHAR (3),
         DELETED           NUMBER (1,0)
    Index is created with following command
    CREATE INDEX ORGANISATION_TEXT_INDEX
    ON COLLABORATOR.ORGANISATION(ORGANISATION_NAME)
    INDEXTYPE IS CTXSYS.CONTEXT PARAMETERS ('');
    Resync command is as follows
    EXEC CTX_DDL.SYNC_INDEX('DOCUMENT_TEXT_INDEX');
    I am testing by runing the command via SQL Plus
    In response to question 'Are you using inso_filter or auto_filter? ' - I dont know
    Thanks for your help,
    Peter

  • Is ctx_ddl.sync_index an offline operation?

    Sorry if the answer to this is staring at me in the documentation: I couldn't find it if so.
    We run Standard Edition 11.2.0.1, so RECREATE_INDEX_ONLINE is not available to us.
    Instead, we regularly (about every 2 hours) use ctx_ddl.sync_index to get our Text index to pick up new arrivals in the underlying table.
    My question is where ctx_ddl.sync_index is an online operation or not? Does the table become unsearchable whilst it's happening, in other words? Our resyncs take about 8 seconds to complete, and I haven't been able to test for this because if there is an outage, it's over too quickly to spot. But there's talk about us resyncing more frequently -so if it does make the thing unsearchable for even a few seconds, I think we need to know that!

    See "3.5 Managing DML Operations for a CONTEXT Index"
    at http://download.oracle.com/docs/cd/E11882_01/text.112/e16594/ind.htm#i1007544
    and "SYNC_INDEX"
    at http://download.oracle.com/docs/cd/E11882_01/text.112/e16593/cddlpkg.htm#CCREF0652
    Yes, reading them doesn't make it clear the the existing index is usable, queryable while a Sync is running.
    However, it is apparent that new entries from DML are not visible in the index until the SYNC_INDEX is done. The SYNC_INDEX commits new entries in batches -- so it is concurrent with existing entries being queryable.
    Your Text Indexes may need periodic re-optimization.
    see "OPTIMIZE_INDEX"
    at http://download.oracle.com/docs/cd/E11882_01/text.112/e16593/cddlpkg.htm#i998200
    (OTOH : DROP and CREATE is something which you wouldn't do !)
    Text Indexes aren't really "index structures" in the manner of, say, regular B-Tree indexes. They are actually "Tables" that are seen as Indexes -- somewhat like "Lookup Tables".
    (The last time I worked with Text Indexes was in 8.1.7 , but 11.2 doesn't negate any of my knowledge of Text Indexes).
    Hemant K Chitale

  • CTX_DDL.SYNC_INDEX 'memory' argument

    According to the Oracle Text manual,
    http://download.oracle.com/docs/cd/B28359_01/text.111/b28304/cddlpkg.htm#i998469
    The memory parameter specifies the amount of memory Oracle Text uses for the synchronization operation before flushing the index to disk.
    Does this memory come out of the shared pool, or the PGA?
    I want to allocate as much memory as possible for a one-time index sync following a massive data intake, but I need to know where the memory is coming from.
    Thanks

    According to the Performance FAQ,
    http://www.oracle.com/technology/products/text/x/faqs/imt_perf_faq.html#q21
    It helps to size your SGA downward during an index rebuild to make more room for the indexing process. So the 'memory' referred to in CTX_DDL.SYNC_INDEX must be external to the SGA. That's what I needed to know.

  • Ctx_ddl.sync_index

    The sql below synchronizes all the pending context:
    set echo off
    set heading off
    set feedback off
    set pagesize 50000
    spool c:\sync.sql
    select distinct 'exec ctx_ddl.sync_index(''' || PND_INDEX_OWNER || '.' || PND_INDEX_NAME || ''')' from ctx_pending;
    spool off
    @c:\sync.sql;
    Would it be possible to transform the above code into a procedure?
    So I could run that procedure at regular intervals using dbms_job ?
    Can Anyone translate the above into a procedure ?
    Thanks.

    I've received the procedure from a college:
    create or replace procedure sync_context
    is
    begin
    for s_rec in
    (select distinct pnd_index_owner, pnd_index_name
    from ctx_pending) loop
    execute immediate 'begin ctx_ddl.sync_index('''||s_rec.pnd_index_owner||'.'||s_rec.pnd_index_name||'''); end;';
    end loop;
    end;
    Extra Question:
    As user ctxsys it should be sufficient to execute ctx_dll.sync_index to sync all pending context
    but this does not seem to work properly ??

  • CTX_DDL.SYNC_INDEX gives ORA-03113

    I am trying to use the CTX_DDL.SYNC_INDEX command in order to update the full Text Index on a table, which contains a word document as a binary object, but I get an ORA-03113 error every time I do this. I get the same error if the table contains an Excel file. It works perfectly OIK if the table contains simple text files.
    Message was edited by:
    peterearle

    Please post your question in the Oracle Text forum. This forum is for image, audio video.

  • Error building procedure with CTX_DDL.SYNC_INDEX

    I am getting the following error when I try to compile a procedure with a call to CTX_DDL.SYNC_INDEX:
    PLS-00201: identifier 'CTX_DDL' must be declared
    The public synonym for CTX_DDL exists and I can run ctx_ddl.sync_index from an anonymous block within SQL*PLUS. I also have other instances where the procedure will compile. The only real difference I can see between the 2 is the one where it will compile has the QUERY REWRITE privilege whereas the one where it will not compile does not. Is there some reason this privilege is required? Or is there something else I need to get this to compile?
    Thank you for any information.

    Hi,
    to see if some records are waiting to be indexed you can query the view CTX_USER_PENDING:
    select * from ctx_user_pending
    where pnd_index_name = 'NOTES_DETAIL4_INDX';If this gives rows, then you need to Synchronize the index. If it give no rows, then all the records are indexed.
    Herald ten Dam
    http://htendam.wordpress.com

  • Problem using CTXXPATH index

    Hi all,
    i'm using Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 on Windows.
    I created this table
    create table PERSISTENT_COMPOSITION
      COMPOSITION_ID NUMBER(19) not null,
      XML_CONTENT    SYS.XMLTYPE not null,
    )and filled it with more or less 1.000.000 records (that si 1.000.000 xml document loaded into XML_CONTENT).
    Then first of all i tested it with a simple query just like the following:
    SELECT *
      FROM PERSISTENT_COMPOSITION t
    WHERE existsNode(t.xml_content, '/composition/archetype_details/archetype_id[value="openEHR-EHR-COMPOSITION.composition_test.v1"]') = 1;obtaining the expected result: 50,000 records found.
    Now, in order to improve query performances, i created a CTXXPATH index as follows:
    CREATE INDEX IDX#COMP_CTXXPATH ON PERSISTENT_COMPOSITION(XML_CONTENT) INDEXTYPE IS CTXSYS.CTXXPATH;Then i tested the new performances using exactly the same query shown above...and here comes the problem: the query returns NO RESULT! No record was found! I looked at the query execution plan and it uses the created index IDX#COMP_CTXXPATH...but no record could be found...
    I thought it could be a matter of namespace: in fact loaded xml documents have a xmlns set and so i changed the query as follows:
    SELECT *
    FROM persistent_composition t
    WHERE existsNode(t.xml_content,
                      '/composition/archetype_details/archetype_id[value="openEHR-EHR-COMPOSITION.composition_test.v1"]',
                 'xmlns="http://this.is.an.xmlns.url.org/v1"') = 1and surprise: i obtained my 50,000 results just like before BUT, looking at the query execution plan, the IDX#COMP_CTXXPATH index HASN'T BEEN USED!!!
    I really don't understand why using the IDX#COMP_CTXXPATH i get no result....can someone help me?
    Thank you very much
    P.S: i tried using ANALYZE (both on index and on table), CTX_DDL.sync_index and CTX_DDL.optimize_index but got no result..
    Edited by: user11295548 on 29-giu-2009 5.47

    Besides following Mark's advice, and I could be mistaken regarding this in combination with domain indexes, you should NOT use ANALYZE anymore in a Oracle 10 environment. Instead use DBMS_STATS. Its more flexible.
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_4005.htm#SQLRF01105
    Note:
    Do not use the COMPUTE and ESTIMATE clauses of ANALYZE to collect optimizer statistics.
    These clauses are supported for backward compatibility.
    Instead, use the DBMS_STATS package, which lets you collect statistics in parallel,
    collect global statistics for partitioned objects, and fine tune your statistics collection
    in other ways. The optimizer, which depends upon statistics, will eventually use only
    statistics that have been collected by DBMS_STATS.
    See PL/SQL Packages and Types Reference for more information on the
    DBMS_STATS package. You must use the ANALYZE statement (rather than
    DBMS_STATS) for statistics collection not related to the cost-based optimizer, such as:
    - To use the VALIDATE or LIST CHAINED ROWS clauses
    - To collect information on freelist blocks

  • Problem when using About Operator in Contains Query

    Hi,
    I'm new to Oracle and this forums too. I have a problem when using about operator in contains query.
    I create a table with some records and then create a context index on 'name' column.
    CREATE TABLE my_items (
      id           NUMBER(10)      NOT NULL,
      name         VARCHAR2(200)   NOT NULL,
      description  VARCHAR2(4000)  NOT NULL,
      price        NUMBER(7,2)     NOT NULL
    ALTER TABLE my_items ADD (
      CONSTRAINT my_items_pk PRIMARY KEY (id)
    CREATE SEQUENCE my_items_seq;
    INSERT INTO my_items VALUES(my_items_seq.nextval, 'Car', 'Car description', 1);
    INSERT INTO my_items VALUES(my_items_seq.nextval, 'Train', 'Train description', 2);
    INSERT INTO my_items VALUES(my_items_seq.nextval, 'Japan', 'Japan description', 3);
    INSERT INTO my_items VALUES(my_items_seq.nextval, 'China', 'China description', 4);
    COMMIT;
    EXEC ctx_ddl.create_preference('english_lexer','basic_lexer');
    EXEC ctx_ddl.set_attribute('english_lexer','index_themes','yes');
    EXEC ctx_ddl.set_attribute('english_lexer','theme_language','english');
    CREATE INDEX my_items_name_idx ON my_items(name) INDEXTYPE IS CTXSYS.CONTEXT PARAMETERS('lexer english_lexer');
    EXEC ctx_ddl.sync_index('my_items_name_idx');Then I perform contains query to retrieve record :
    SELECT count(*) FROM my_items WHERE contains(name, 'Japan', 1) > 0;
    COUNT(*)
          1
    SELECT count(*) FROM my_items WHERE contains(name, 'about(Japan)', 1) > 0;
    COUNT(*)
          1But the problem is when I using ABOUT operator like in Oracle's English Knowledge Base Category Hierarchy it return 0
    SELECT count(*) FROM my_items WHERE contains(name, 'about(Asia)', 1) > 0;
    COUNT(*)
          0
    SELECT count(*) FROM my_items WHERE contains(name, 'about(transportation)', 1) > 0;
    COUNT(*)
          0I can't figure out what 's wrong in my query or in my index.
    Any help will be appreciated.
    Thanks,
    Hieu Nguyen
    Edited by: user2944391 on Jul 10, 2009 3:25 AM

    Hello (and welcome),
    You'd be best asking this question in the Oracle Text forum, here:
    Text
    And by the way, it will help others to analyse if you put {noformat}{noformat} (lowercase code in curly brackets) before and after your code snippets.
    Good luck!                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Problem with content search

    Hello everyone,
    Well, i know that's a question that have been already answered but i have the following problem :
    Content search doesn't work. I mean, it used to work when i tried it (1 month ago...). I have a small program using the API that perfectly worked. But, since i have upgraded iFS (from 1.1.6 to 1.1.9) it doesn't work anymore. Intermedia runs (that's the first thing i checked) and attribute search works fine. I tried to launch Intermedia manually (using ctxsrv) but it didn't change anything. Even the advanced search of the web interface doesn't work so it shouldn't come from my code...
    I don't understand what's happening. Could someone help me ? (this week, nothing works as it should...)
    Thanks in advance.
    Regards,
    Guillaume

    Hi Guillaume,
    did you follow the POST installation steps after upgrading from 1.1.6 to 1.1.9 ???
    (as descibed in http://technet.oracle.com/docs/products/ifs/pdf/install_nt_1.1.pdf)
    You need at least populate intermedia text indexes for all existing documents, which can be done via:
    sqlplus ifssys/<ifssys password>
    exec ctx_output.start_log('ifsidx.log')
    update odmm_contentstore set indexedblob=indexedblob;
    commit;
    exec ctx_ddl.sync_index('indexedblob_i');
    exec ctx_output.end_log
    This might take a while....
    HTH,
    Ralf

  • Problem with context search in iFS

    Hello , here is my problem with iFS.
    We have installation of Oracle 8.1.7 Enterprise edition with interMedia and iFS 1.1 on same server (Windows NT Server 4.0/512 RAM). During install everything went fine.
    I had uploaded about 200 MB files in the iFS (pdf's and html's).
    The problem is when I try to use context based search. If I search for file's name everything is fine, but when I search for a word that is in a file it almost immediately gives mi "0 file(s) found", and I'm sure that there are files that have that word in their body's.
    What can be the problem?
    Any sugestions will be in help.
    Thanks in advance.

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by mark_d_Drake ():
    That's the way it works. Content Indexing is not on insert, it occurs when the ctxsrv process runs. See the IntermediaText doc for more information.
    <HR></BLOCKQUOTE>
    Documents's content is stored in the GLOBALINDEXEDBLOB column of the IFSSYS.ODMM_CONTENTSTORE table.
    There is an text index GLOBALINDEXEDBLOB_I built on this column.
    To make the context search possible just update this index using the following command in SQL*Plus:
    SQL> exec ctx_ddl.sync_index('GLOBALINDEXEDBLOB_I');
    If you want this index be updated automatically when new documents are uploaded/changed/deleted in iFS then start the ctxsrv utility on the computer where your Oracle database resides. To do this issue the following command in OS command line:
    ctxsrv -user ctxsys/ctxpwd@db_alias
    just replace here ctxpwd and db_alias with real values you specified during the installation.
    null

  • Content search problem

    Hi all
    I am having some problems with the content search. Please help me with this:
    In iFS, a new document type "MWORLDTYPE" (sub type of DOCUMENT class) is created. I am using SimpleXmlParser to load xml files and convert them into mworldType documents. After parsing all loaded xml documents are seen as mworldType documents. My task is to do Attribute+content search.
    I used the below code to do content search. Though one of my xml (mworldType) documents contain the text for which I am searching, I am getting zero results.
    Used the below statement to run the file:
    java ExtendedContentSearchXml name
    Attached please see the following documents: 1. source code, 2. sample xml instance.
    source code
    // $Header$
    // Copyright (c) 2000 Oracle Corporation
    public class ExtendedContentSearchXml extends BaseTestHarness
    private String phrase ;
    * Constructor
    * Please complete the missing tags for ContentSearch
    * @param
    * @return
    * @throws
    * @pre
    * @post
    public ExtendedContentSearchXml()
    * Please complete the missing tags for doSomething
    * @param
    * @return
    * @throws
    * @pre
    * @post
    public void doSomething( LibrarySession ifs )
    throws IfsException
    ifs.setAdministrationMode(true);
    //SearchSpecification searchSpecification = buildSearch( Document.CLASS_NAME, "doc", phrase );
    SearchSpecification searchSpecification = buildSearch( "MWORLDTYPE", "mworldType", phrase );
    Search search = new Search( ifs, searchSpecification );
    search.open();
    SearchResultObject [] results = search.getItems();
    search.close();
    if( results != null )
    System.out.println("The number of object founds are " + results.length);
    for( int i = 0; i < results.length; i++ )
    SearchResultObject sro = results [ i ];
    Document doc = ( Document ) sro.getLibraryObject( Document.CLASS_NAME );
    System.out.println( "Document : " + doc.getName() + ", path =" doc.getAnyFolderPath() " Score (query1) = " + sro.getScore("query1"));
    doc.filterContent( false );
    BufferedReader reader = new BufferedReader( doc.getFilteredContent() );
    try
    for( String nextLine = reader.readLine();
    nextLine != null;
    nextLine = reader.readLine() )
    //System.out.println( nextLine );
    catch( IOException ioe )
    throw new IfsException( 9999, ioe );
    else
    System.out.println("No Results Found");
    public void setPhrase(String str) {
    phrase = str;
    * Please complete the missing tags for buildSearch
    * @param
    * @return
    * @throws
    * @pre
    * @post
    public SearchSpecification buildSearch( String className, String fileExtension, String phrase )
    throws IfsException
    // Document.DescriptionAttribute contains 'phrase';
    AttributeQualification aq1 = new AttributeQualification();
    //aq1.setAttribute( Document.CLASS_NAME, PublicObject.NAME_ATTRIBUTE );
    aq1.setAttribute( "MWORLDTYPE", PublicObject.NAME_ATTRIBUTE );
    aq1.setOperatorType( AttributeQualification.LIKE );
    aq1.setCaseIgnored( true );
    //aq1.setValue( "%doc" );
    aq1.setValue( "%mworldType" );
    // Document.ContentObject = ContentObject.ID
    JoinQualification jq1 = new JoinQualification();
    jq1.setLeftAttribute( className, Document.CONTENTOBJECT_ATTRIBUTE );
    jq1.setRightAttribute( ContentObject.CLASS_NAME, null );
    // Combine the Attribute and Join Qualifications
    SearchClause searchClause = new SearchClause( aq1, jq1, SearchClause.AND );
    // Create the Content Query 'Document Body contains phrase...' and add it in.
    String queryName = "query1";
    ContextQualification contentClause = new ContextQualification();
    contentClause.setQuery( phrase );
    contentClause.setName( queryName );
    System.out.println("Search phrase =" + phrase);
    searchClause = new SearchClause( searchClause, contentClause, SearchClause.AND );
    // Add in the FreeForm Search....
    //FreeFormQualification fq1 = new FreeFormQualification();
    //fq1.setSqlExpression("contains(description,'script',2) > 0");
    //searchClause = new SearchClause( searchClause, fq1, SearchClause.AND);
    // Set up th e Search Class Spec.
    SearchClassSpecification scs = new SearchClassSpecification();
    // Add in the Class for the Where Clause
    String [] searchClasses = new String []
    className, "DOCUMENT",
    ContentObject.CLASS_NAME
    scs.addSearchClasses( searchClasses );
    // Add in the Class for the Select Clause
    scs.addResultClass( className );
    // Define the Order by Clause
    // The List of Classes for the Order Clause
    String [] classNames = new String []
    ContentObject.CLASS_NAME
    // The List of Attibutes for the Order Clause.
    String [] attributes = new String []
    ContextQualification.ORDER_PREFIX + "." + queryName
    // The Ordering for the Attributes in the Order Clause
    boolean [] sortOrder = new boolean []
    false
    SearchSortSpecification sss = new SearchSortSpecification( classNames, attributes, sortOrder );
    // AttributeSearchSpecification searchSpec = new AttributeSearchSpecification();
    ContextSearchSpecification searchSpec = new ContextSearchSpecification();
    searchSpec.setContextClassname( ContentObject.CLASS_NAME );
    // Set the SELECT statement and FROM statement of the search
    searchSpec.setSearchClassSpecification( scs );
    // Set the WHERE clause of the Search
    searchSpec.setSearchQualification( searchClause );
    // Set the ORDER by clause of the search
    searchSpec.setSearchSortSpecification( sss );
    return searchSpec;
    * main
    * @param args
    * Please complete the missing tags for main
    * @return
    * @throws
    * @pre
    * @post
    public static void main( String [] args )
    ExtendedContentSearchXml contentSearch = new ExtendedContentSearchXml();
    contentSearch.setPhrase(args[0]);
    contentSearch.run();
    xml instance
    <?xml version="1.0" standalone="yes"?>
    <mworldType>
    <name> mworld_1.mworldType</name>
    <Category1>Administration</Category1>
    <sub_category1>General_1</sub_category1>
    <topic>Office Protocol_1</topic>
    <format_type>Other</format_type>
    <language>US English</language>
    <submit_company>AMA</submit_company>
    <submit_name>Ken Sickles</submit_name>
    <submit_date format="mm-dd-yyyy">01-29-2001</submit_date>
    <posted_date format="mm-dd-yyyy">01-29-2001</posted_date>
    <posted_by>Ken Sickles</posted_by>
    <access_level>All</access_level>
    <rb_metadata> no meta data </rb_metadata>
    <blurb> this is blurb </blurb>
    <content_url>www.mworld_1.com </content_url>
    <content>My name is Sridevi. This is the content of mworld_1 xml document </content>
    </mworldType>
    Thank you
    Sridevi.
    null

    Either run ctxsrv on the database machine or do the following using SQL*Plus (logged in as the ifs schema):
    exec ctx_ddl.sync_index('globalindexedblob_i')
    Read the interMedia Text documentation for more information about updating interMedia Text indexes.

Maybe you are looking for

  • Primary key vs Secondary key - why would a rpt hit one as to the other?

    Post Author: kevans CA Forum: Data Connectivity and SQL Here's an issue that surfaced when using CRW10, happens with XI as well, but not an issue with CRW8 - each one is hitting the same SQL Server db. I discovered something today and I'm not sure if

  • How to display long text in smartforms

    Hi experts, Iam trying to display long text into smartforms.I got the long text into ITAB frm database in the abap program.In the form interface how to define the variable?In the long text i have 6 lines. points guaranteed cheers kaki

  • Iweb 08 AND google search???

    Hey, I hope someone can help me. 1st off, I don't know much about page design and all that stuff. I know a little, but please simple terms. I'm thinking of making a page in Iweb, however, I want my page to be indexed and search easy if someone should

  • Java.io.StreamCorruptedException: invalid stream header

    I am having a problem with sending two objects (over a socket). I have read in other posts that this could be due to trying to receive incompatible data types but my applications work fine if I send my objects synchronously rather than asynchronously

  • Multiple masks not adding like they should

    Hi all, I don't use motion all that much, so I may have not done something right.  I have a video clip with an object I need to isolate from the background.  E object is complex enough where I'll need to have multiple masks make to do it properly.  S