Creating interMedia substring index on a CLOB that contains XML

I have a CLOB column that has an existing XML_SECTION_GROUP index on certain tags within the XML content of the CLOB. (see script below)
begin
ctx_ddl.create_section_group('XMLDOC','XML_SECTION_GROUP');
end;
begin
ctx_ddl.add_zone_section ('XMLDOC','title','title');
ctx_ddl.add_zone_section('XMLDOC','keywords','keywords');
ctx_ddl.add_zone_section('XMLDOC','author','author');
end;
create index xmldoc_idx on xml_documents(xmldoc)
indextype is ctxsys.context
parameters ('section group xmldoc') ;
I have a requirement to search on the 'author' zone section by the first letter only. I figure a substring index is the way to go but I'm not sure of the syntax to create a substring index. Especially when I have already declared a SECTION_GROUP preference on this column and I would need to create a WORDLIST preference as well I think. Can someone help me out here?
null

Here is the answer from Oracle Text Help:
"the main problem here is that you cannot apply that fancy substring
processing just to the author section -- it will apply to everything,
which will probably blow up the index size.
Anything you do will require reindexing the documents, so you cannot
really get around having to rebuild the index entirely.
Here are various ways to tackle the problem:
1. do nothing. Query just like: Z% WITHIN AUTHOR
PRO: don't have to rebuild index
CON: query is slow. some queries cannot be executed due to
wildcard maxterms limits.
2. create a wordlist preference with PREFIX_INDEX set to TRUE,
PREFIX_MIN_LENGTH set to 1 and PREFIX_MAX_LENGTH set to 1.
Query looks like: Z% WITHIN AUTHOR
PRO: moderately fast query
CON: must be on 8.1.7 or above
get a lot of junk from words from other sections
3. 2) as above, plus make AUTHOR, KEYWORDS, TITLE field sections
PRO: faster query than 2)
CON: field sections are less flexible w.r.t. nesting and
repeating occurrences
4. use a user_datastore or procedure_filter to transform the data
so that <AUTHOR>Steven King</AUTHOR> becomes
<AUTHORINIT>AIK</AUTHORINIT><AUTHOR>Steven King<AUTHOR>
Use field section for AUTHORINIT and query becomes:
AIK within AUTHORINIT (I used AIK instead of just K so that you
don't have to make I and A non-stopwords)
PRO: fastest query, smallest index
CON: most work
have to massage data so slows down indexing"

Similar Messages

  • Search a CLOB column(contains XML) in Oracle table

    Hi,
    I need help on how will i be able to search the data in a clob column that contains XML in an ORACLE table.
    Thanks,
    PSS

    We are using 10g.. and database in which the table is located.. i just have a read only access .. so i am pulling all the data into a flat file (im using a shell script) and from there on i need to process the data... and my problem is how to pull the data in the CLOB using sql or whichever way.. if you can explain me with an example i would really appreciate it...
    Thanks,
    PSS

  • Velocity Template that contains XML

    I have found an annoying issue with .vm velocity template files that contain XML within JDeveloper 10.1.3.0.4 (SU3). The .vm file is being picked up as an XML file and XML validation is failing due to the velocity commands. This is stopping me building the application. The issue is due to the first line containing <?xml version="1.0" encoding="UTF-8"?>.
    I have a work around with the following as the first lines of .vm file.
    #set($foo = '<?xml version="1.0" encoding="UTF-8"?>')
    $foo
    Is there a way to associate .vm files with a velocity syntax checker such as the VelocityWebEdit plug in for eclipse? (https://sourceforge.net/project/showfiles.php?group_id=126011)

    Preloaders tend to sit in the first few frames of a timeline,
    If you are using any of the XML component objects then they
    have to be also registered in the first frame so that their
    respective bindings can be set before use.

  • Quering on blob fields that contain XML

    Hi All,
    I need to query on blob fields that contain XML data. So I wanna say give me XML docs where ELEMENT[@ATTRIBUTE='VALUE']. So, I need to be able to query on attributes. Is there any way to do that?
    Thanks.

    Thanks for the attempt, but tried what you suggested and it will only pull records where the Asterisk is the ONLY character in that data field.
    Maybe I wasn't clear enough.
    I have in access of 200,000 records in KNA1, out of which some of them have one or more * values in the some of the fileds, eg: Comany ABC At XXXX road Workshop  is stored in the Name 1 field, I want all records like this where * is one of the characters in that field.
    May have to download the entire lot and use Excel to filter.

  • Creating intermedia text index error

    Hello. I tried creating an index using the below command
    create index mydocs_text_index on
    mydocs(thefile) indextype is ctxsys.context;
    However, I received some error message as follows:
    ERROR at line 1:
    ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
    ORA-20000: file not found
    DRG-50704: file not found
    ORA-28575: unable to open RPC connection to external procedure agent
    ORA-06512: at "CTXSYS.DRUE", line 126
    ORA-06512: at "CTXSYS.TEXTINDEXMETHODS", line 54
    ORA-06512: at line 1
    What do you think is wrong?
    Thank you

    Is the listener up and running?
    Installation
    1.What are the steps to install interMedia Text manually, AFTER installing the code via the
    installer?
    A.
    cd $ORACLE_HOME/ctx/admin
    B. as SYS:
    @dr0csys.sql ctxsys system temp
    where ctxsys is the ctxsys password
    system is the default tablespace for ctxsys
    temp is the temporary tablespace for ctxsys
    C. as CTXSYS:
    @dr0inst.sql
    /oracle/db/dev118/ctx/lib/libctxx8.so
    (on Solaris)
    where /oracle/db/dev118 is $ORACLE_HOME
    D. as CTXSYS:
    @defaults/drdefus.sql
    Note: this is assuming you want U.S. to be your language default, otherwise run the
    corresponding drdef for your language.
    2.What are the steps to install interMedia Text manually, with a Net8 Configuration?
    A. Configure an IPC listener address.
    For example, change:
    LISTENER =
    (ADDRESS_LIST=
    (ADDRESS=
    (PROTOCOL=tcp) (HOST=ap118sun.us.oracle.com) (PORT=1521)
    to:
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC0))
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP) (HOST = ap118sun) (PORT
    =1521))
    This shows the full LISTENER definition in your listener.ora. Note: EXTPROC0 ends in a
    zero.
    B. Add a system identifier (SID) name of PLSExtProc and a program name of EXTPROC in the server's LISTENER.ORA file.
    For example, in the SID_LIST_LISTENER definition, insert:
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC = ...
    (SID_DESC =
    (SID_NAME=PLSExtProc)(ORACLE_HOME=/oracle/db/dev118)
    (PROGRAM=extproc)
    C. Add a net service name description entry for EXTPROC0 in the server's tnsnames.ora
    file, using SID rather than SERVICE_NAME in the CONNECT_DATA section.
    For example, add this to the end of tnsnames.ora:
    extproc_connection_data =
    (DESCRIPTION=
    (ADDRESS_LIST =
    (ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC0))
    (CONNECT_DATA=
    (SID=PLSExtProc)
    (PRESENTATION = RO)
    This entry should be added exactly as you see it here (do NOT substitute your SID
    anywhere, do NOT change the case of any text). Note: EXTPROC0 ends in a zero, RO
    ends in an Oh
    1.How do I check my interMedia Text installation and setup?
    A.
    lsnrct1status
    should give you the following:
    LSNRCTL for Solaris: Version
    8.1.5.0.0 - Production on 31-MAR-99 18:57:49
    (c) Copyright 1998 Oracle Corporation. All rights reserved.
    Connecting to
    (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC0)))
    STATUS of the LISTENER
    Alias LISTENER
    Version TNSLSNR for Solaris: Version 8.1.5.0.0 - Production
    Start Date 30-MAR-99 15:53:06
    Uptime 1 days 3 hr. 4 min. 42 sec
    Trace Level off
    Security OFF
    SNMP OFF
    Listener Parameter File
    /private7/oracle/oracle_home/network/admin/listener.ora
    Listener Log File
    /private7/oracle/oracle_home/network/log/listener.log
    Services Summary...
    PLSExtProc has 1 service handler(s)
    oco815 has 3 service handler(s)
    The command completed successfully
    The important information to understand here is the service handler for PLSExtProc.
    B. Create a user/table/index/query thus:
    As SYS or SYSTEM:
    create user ctxtest identified by ctxtest ;
    grant connect, resource, ctxapp to ctxtest ;
    Do any other grants, quotas, tablespace etc. for the new user. As CTXTEST:
    create table quick
    quick_id number primary key,
    text varchar(80)
    insert into quick ( quick_id, text )
    values ( 1, 'The cat sat on the mat' );
    insert into quick ( quick_id, text )
    values ( 2, 'The quick brown fox jumped over the lazy dog' );
    commit;
    create index quick_text on quick ( text )
    indextype is ctxsys.context;
    At this point, if your Net8 setup is NOT correct you will get:
    create index quick_text on quick ( text )
    ERROR at line 1:
    ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
    ORA-20000: ConText error:
    DRG-50704: Net8 listener is not running or cannot start external procedures
    ORA-28575: unable to open RPC connection to external procedure agent
    ORA-06512: at "CTXSYS.DRUE", line 122
    ORA-06512: at "CTXSYS.TEXTINDEXMETHODS", line 34
    ORA-06512: at line 1
    If everything is OK, you will get:
    Index created.
    Now try some queries:
    SQL> select quick_id from quick where contains(text, 'cat')>0;
    QUICK_ID
    1
    SQL> select quick_id from quick where contains(text, 'fox')>0;
    QUICK_ID
    2
    Congratulations !! You now have a successful interMedia Text V8.1 installation.
    null

  • Errors reading documents when creating intermedia text indexs;

    The populating progress ended normally without error message . I check the log and found some reading errors happens during populating progress.
    The log is:
    12:56:45 07/19/00 begin logging
    12:56:58 07/19/00 populate index: CS.CTX_ADDRESS
    12:56:58 07/19/00 Begin document indexing
    12:56:58 07/19/00 100 documents indexed
    12:56:58 07/19/00 200 documents indexed
    12:56:58 07/19/00 300 documents indexed
    12:56:58 07/19/00 Errors reading documents: 0
    12:56:58 07/19/00 Index data for 342 documents to be written to database
    12:56:58 07/19/00 memory use: 305012
    12:56:58 07/19/00 index data written to database.
    12:56:58 07/19/00 End of document indexing. 342 documents indexed.
    Only 1 percente of all rows are populated.
    Somebody help me!!!

    How many rows in your $I?
    Which rows are not being populated?

  • Index on table columns that contain mixed upper- and lower- case values

    Hi,
    Can anyone tell if an indexing will benefit when column values are not consistent - some uppercase and some lowercase or mixed? The table contains 17 million rows. If index is created, it will concatenate 7 columns. When doing search, I need to have the WHERE clause like WHERE UPPER(LAST_NAME) LIKE UPPER(:P2_LAST_NAME_SEARCH) because values loaded into the table are not consistent. Does the following index help or not?
    CREATE INDEX IDX_TEST ON TABLE1(COL1, COL2, ...) TABLESPACE "INDEX";

    you can try Function Based Index for this
    cheers

  • Create intermedia index hang

    Hi
    I have table that contain XML in a CLOB datatype
    I'm trying to create this index with this section group:
    begin
    ctx_ddl.create_section_group
    ('feature_group','XML_SECTION_GROUP');
    ctx_ddl.add_field_section('feature_group', 'Title', 'title',
    true);
    ctx_ddl.add_field_section('feature_group', 'Level1', 'level1',
    true);
    ctx_ddl.add_field_section('feature_group', 'Level2', 'level2',
    true);
    ctx_ddl.add_field_section
    ('feature_group','Partnerlist','partnerlist',true);
    ctx_ddl.add_field_section
    ('feature_group','Topiclist','topiclist',true);
    end;
    CREATE INDEX INTEGRATED_SEARCH ON INTEGREATED_SEARCH(CONTENT)
    INDEXTYPE IS CTXSYS.CONTEXT PARAMETERS ('Section group
    feature_group');
    the index start to work after 19000 record indexed it Hang, i
    tried everything to see what happen but nothing no messages, i
    trace all the file.
    by the way i have 4 instance in Oracle all of them work fine
    with this index only in this instance.
    Thank you
    Ray.

    Also here after a big while I was able to help myselfe. Obviousely no ORACLE Personell if available for this forum.
    With the following script I can update the InterMediaIndex periodically.
    Index-Sync-Prozedur:
    create or replace procedure ctxsys.i_doc_sync
    is
    cursor
    c1 is
    select distinct PND_INDEX_OWNER, PND_INDEX_NAME from CTX_PENDING;
    begin
    for c_rec in c1
    loop
    execute immediate 'alter index '&#0124; &#0124;c_rec.pnd_index_owner&#0124; &#0124;'.'&#0124; &#0124;
    c_rec.pnd_index_name &#0124; &#0124;' rebuild online parameters(''sync memory
    1000000'')';
    end loop;
    end;
    Index-Sync-Job:
    declare
    jobno number;
    begin
    dbms_job.submit(job=>jobno, what=>'ctxsys.i_doc_sync;',
    next_date=>sysdate+2/(60*24), interval=>'sysdate+5/(60*24)');
    commit;
    end;
    null

  • Creating a form with a field that contains a simple math problem.

    I am creating a form in Acrobat 9 Standard that contains a field that requires a simple math function (divide).
    if (QuantityRow1 > 0)
    ExtensionRow1 / QuantityRow1
    Take the value input in ExtensionRow1 and divide it by the value in QuantityRow1. I have included an IF statement to prevent an error that occur if QuantityRow1 were equal to zero.
    After inputting the data into the two fields I tab past the field where I expect to see my result and the field remains blank. I don't receive any error messages.
    Any ideas? Thanks - jb

    This is a duplicate of your question on Acrobatusers.com (
    http://answers.acrobatusers.com/Need-simple-math-operation-function-Acrobat-9-Standard-cre ating-form-q142800.aspx
    Did the information provided there not help you with your problem?
    Karl Heinz Kremer
    PDF Acrobatics Without a Net
    PDF Software Development, Training and More...
    [email protected]
    http://www.khkonsulting.com

  • Creating intermedia index is taking too long!!

    creating intermedia index is taking too long. then memory insufficient... system down.
    please help.
    platform: win2000 pro, oracle817
    linux redhat, oracle817

    Use CTX_OUTPUT_START_LOG() to begin logging index requests. Then create an index and see what's going on.
    o.

  • Error creating intermedia index in Portal

    We are running Portal 3.0.6 on Solaris 3.8.
    We are having trouble creating intermedia index. We get the "An unexpected error has occurred (WWS-32100)", when trying to create the index thru the UI.
    We tried metalink's suggestion and executed inctxgrn.sql. The error Persists on the UI, when you click create index.
    We tried to create the index from pl/sql, by executing ctxcrind.sql. we got the following error
    ERROR at line 1:
    ORA-06502: PL/SQL: numeric or value error
    ORA-06512: at "SYS.OWA_UTIL", line 323
    ORA-06512: at "SYS.HTP", line 859
    ORA-06512: at "SYS.HTP", line 974
    ORA-06512: at "SYS.HTP", line 992
    ORA-06512: at "SYS.HTP", line 40
    ORA-06512: at "PORTAL30.WWERR_API_ERROR_UI", line 109
    ORA-06512: at "PORTAL30.WWERR_API_ERROR_UI", line 57
    ORA-06512: at "PORTAL30.WWSBR_STDERR", line 350
    ORA-06512: at "PORTAL30.WWSBR_ERROR", line 8
    ORA-06512: at "PORTAL30.WWV_CONTEXT", line 377
    ORA-20100:
    ORA-06512: at "PORTAL30.WWSBR_STDERR", line 437
    ORA-06512: at "PORTAL30.WWV_CONTEXT", line 218
    ORA-20100:
    ORA-06512: at "PORTAL30.WWSBR_STDERR", line 437
    ORA-06512: at "PORTAL30.WWV_CONTEXT_UTIL", line 39
    ORA-20000: interMedia Text error:
    DRG-12603: CTXSYS does not own user datastore procedure: WWSBR_THING_CTX_41
    ORA-06512: at line 4
    null

    Seems like a package owenership problem.
    I suggest to post the same message in the Portal forum.

  • How to create a domain index on NCLOB Column

    hi all,
    My database version is 10.2.0.1.
    Any body know how to create a domain index on nclob column.
    SQL> alter table test add (nclob1   nclob);
    Table altered.
    SQL> CREATE INDEX test_nclob ON test (nclob1) indextype is ctxsys.context
      2  /
    CREATE INDEX test_nclob ON test (nclob1) indextype is ctxsys.context
    ERROR at line 1:
    ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
    ORA-20000: Oracle Text error:
    DRG-10509: invalid text column: NCLOB1
    ORA-06512: at "CTXSYS.DRUE", line 160
    ORA-06512: at "CTXSYS.TEXTINDEXMETHODS", line 364Regards
    Singh

    Any body know how to create a domain index on nclob columnNot possible per design/documentation:
    The column that you specify must be one of the following types: CHAR, VARCHAR, VARCHAR2, BLOB, CLOB, BFILE, XMLType, or URIType.
    «

  • Error creating a text Index

    When i tried to create a text index on my system (Oracle 8.1.6, RedHat Linux 6.2) i always get the same error:
    create index pkk on teste(maisumteste)indextype is ctxsys.context
    ERROR at line 1:
    ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
    ORA-20000: interMedia Text error:
    ORA-06520: PL/SQL: Error loading external library
    ORA-06522: ctxsys: cannot open shared object file: No such file or directory
    ORA-06512: at "CTXSYS.DRUE", line 126
    ORA-06512: at "CTXSYS.TEXTINDEXMETHODS", line 54
    ORA-06512: at line 1
    i'm a beginner in intermedia, so right now i'm stalled in this one, please help me.
    Thanks, in advance.
    Tony Cruz

    Raj Kr Pandit wrote:
    where is the issue?The issue is your code is apples and oranges:
    SQL> CREATE TABLE tab_1(aa nvarchar2(50) PRIMARY KEY,bb clob)
      2  /
    Table created.
    SQL> CREATE INDEX xtab_1_bb ON tab_1 (bb) INDEXTYPE IS CTXSYS.CONTEXT
      2  /
    CREATE INDEX xtab_1_bb ON tab_1 (bb) INDEXTYPE IS CTXSYS.CONTEXT
    ERROR at line 1:
    ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
    ORA-20000: Oracle Text error:
    DRG-10528: primary keys of type NVARCHAR2 are not allowed
    ORA-06512: at "CTXSYS.DRUE", line 160
    ORA-06512: at "CTXSYS.TEXTINDEXMETHODS", line 364
    SQL> SY.

  • Question: Is there a way to create a PDF from outlook e-mail that does not embed the attachment? better, is there a way to convert the e-mail with attachement (not embeded) as pdf pages? - Problem: I have 1400 e-mails with attachments that need to be conv

    Is there a way to create a PDF from outlook e-mail that does not embed the attachment? better, is there a way to convert the e-mail with attachement (not embeded) as pdf pages?
    - Problem: I have 1400 e-mails with attachments that need to be converted into pdf and the attachments cannot be embeded.
    System: PC Windows 7 using Acrobat X Prof. - Thank you!

    Hi ,
    There is an option of embedding index for faster search while converting email to a PDF .
    However I am not sure that will serve your purpose or not .
    I would recommend you to get in touch with Microsoft support as well .
    Meanwhile I'll work on it and get back to you in case I get a desired solution .
    Regards
    Sukrit Dhingra

  • Re: how to create a temporary index for a table in program

    Hi,
    I execute a report to access table EKBE. The field that is essential is the CPUDT - entry date.
    Now, the EKBE is not index with this field.
    I do not want to create a permanent index which might occupied space. The current read on EKBE is sequential.
    I thought of creating an index in the program and then releases it once the report is out.
    Is there a way to achieve that?

    Hi,
    You can dump the data into one internal table and create index of that internal table like this:
    tables: ekbe.
    data: begin of itab occurs 0,
           cpudt like ekbe-cpudt,
           indx type i,
           end of itab.
    select cpudt up to 10 rows
    from ekbe into table itab.
    loop at itab.
    itab-indx = sy-tabix.
    write:/ itab-cpudt, itab-indx.
    endloop.
    Regards,
    Bhaskar

Maybe you are looking for