Concatenated datastores

I have developed applications around several intermedia indexed text columns, but now would like to create a concatenated datastore indexing those same columns and using sections within new applications. Will my older applications still be able to access the individual intermedia text indexes that are already in place or will I have to modify the older applications to access the new concatenated datastore?

I have developed applications around several intermedia indexed text columns, but now would like to create a concatenated datastore indexing those same columns and using sections within new applications. Will my older applications still be able to access the individual intermedia text indexes that are already in place or will I have to modify the older applications to access the new concatenated datastore?

Similar Messages

  • Concatenated Datastore doesn't work for me

    I'm using oracle InterMedia Text.
    Now I'm trying to build a Concatenated Datastore.
    I executed the sql-file cdstore.sql. 0 Errors.
    But when I'm trying to execute
    "exec ctx_cd.add_column('my_cdstore',columnname)
    I get this error:
    ORA-01749: you may not GRANT/REVOKE privileges to/from yourself
    ORA-06512: at "TWEB.CTX_cd", line 315
    ORA-06512: at "TWEB.CTX_cd", line 443
    ORA-06512: at "TWEB.CTX_cd", line 816
    ORA-06512: at line 2
    I'm fairly confused. I read that "The Concatenated Datastore is an additional datastore for Oracle Text".
    Can I use it when I'm working with Intermedia, or what am I doing wrong???
    THX for help!

    There are two possibilities here. I think the most likely one is that you've accidently run cdstore.sql as the user "tweb" at some stage. The ctx_cd package is therefore over-riding the version owned by user CTXSYS.
    To check this, log on as user tweb, and do this:
    DROP PACKAGE CTX_CD;
    if that succeeds - then this is the problem. You'll also want to do all this as tweb:
    DROP PACKAGE FRIEDMAN;
    DROP TABLE CTX_CDSTORES;
    DROP TABLE CTX_CDSTORE_COLS;
    DROP SEQUENCE CTX_CDSTORE_SEQ;
    DROP VIEW CTX_USER_CDSTORES;
    DROP VIEW CTX_USER_CDSTORE_COLS;
    The other possibility is that you've modified the package so that it runs under "invoker rights" rather than "definer rights", using the AUTHID clause. This will not work.
    Please let me know if this solves your problem.
    - Roger

  • Fuzzy searching and concatenated datastore query performance problems.

    I am using the concatenated datastore and indexing two columns.
    The query I am executing includes an exact match on one column and a fuzzy match on the second column.
    When I execute the query, performance should improve as the exact match column is set to return less values.
    This is the case when we execute an exact match search on both columns.
    However, when one column is an exact match and the second column is a fuzzy match this is not true.
    Is this normal processing??? and why??? Is this a bug??
    If you need more information please let me know.
    We are under a deadline and this is our final road block.
    TIA
    Colleen GEislinger

    I see that you have posted the message in the Oracle text forum, good! You should get a better, more timely answer there.
    Larry

  • Concatenated datastore performance with other predicates

    Hi
    I am using context indexes with a concatenated datastore.
    The query is like this -
    select *
    from my_table
    where contains ( my_column, 'token_1 within xx or token_2 within yy ', 1 ) > 0
    and some_other_column = 'xxx'
    There is no index on "some_other_column".
    Would it help to include "some_other_column" in the concatenated datastore? Will this increase the performance of the query, or does it always depends on the type of data we have?
    How is the query of a concatenated datastore fired? Is the $I table queried for each token in the query?
    Thanks and regards
    Pratap

    Yes, it should generally be faster to include "some_other_column" in the
    list for the concatenated datastore.
    The query would then be
    select * from my_table where contains
    ( my_column, '(token_1 within xx or token_2 within yy) and (xxx within some_other_column)', 1 ) > 0
    Note that this is not exactly the same as your query - for example if some_other_column contained "abc xxx xyz" then my query would be a hit but yours would not. If you know the column will only ever contain one word, then they are identical.
    - Roger

  • Scoring messed up using concatenated datastore Index

    Hi,
    Here is my table structure....
    CREATE TABLE SRCH_KEYWORD_SEARCH_SME
    SYS_ID NUMBER(10) NOT NULL,
    PAPER_NO VARCHAR2(10),
    PRODIDX_ID VARCHAR2(10),
    RESULT_TITLE VARCHAR2(255),
    RESULT_DESCR VARCHAR2(1000) NOT NULL,
    ABSTRACT CLOB,
    SRSLT_CATEGORY_ID VARCHAR2(10) NOT NULL,
    SRSLT_SUB_CATEGORY_ID VARCHAR2(10) NOT NULL,
    ACTIVE_FLAG VARCHAR2(1) DEFAULT 'Y' NOT NULL,
    EVENT_START_DATE DATE,
    EVENT_END_DATE DATE,
    Here is the Concatenated Datastore preference...
       -- Drop any existing storage preference.
       CTX_DDL.drop_preference('SEARCH_STORAGE_PREF');
       -- Create new storage preference.
       CTX_DDL.create_preference('SEARCH_STORAGE_PREF', 'BASIC_STORAGE');
          CTX_DDL.set_attribute('SEARCH_STORAGE_PREF', 'I_TABLE_CLAUSE', 'tablespace searchidx');
          CTX_DDL.set_attribute('SEARCH_STORAGE_PREF', 'K_TABLE_CLAUSE', 'tablespace searchidx');
          CTX_DDL.set_attribute('SEARCH_STORAGE_PREF', 'R_TABLE_CLAUSE', 'tablespace searchidx lob (data) store as (disable storage in row cache)');
          CTX_DDL.set_attribute('SEARCH_STORAGE_PREF', 'N_TABLE_CLAUSE', 'tablespace searchidx');
          CTX_DDL.set_attribute('SEARCH_STORAGE_PREF', 'I_INDEX_CLAUSE', 'tablespace searchidx  compress 2');
          CTX_DDL.set_attribute('SEARCH_STORAGE_PREF', 'P_TABLE_CLAUSE', 'tablespace searchidx');
       -- Drop any existing datastore preference.
       CTX_DDL.drop_preference('SEARCH_DATA_STORE');
       CTX_DDL.DROP_SECTION_GROUP('SEARCH_DATA_STORE_SG');
       -- Create new multi-column datastore preference.
       CTX_DDL.create_preference('SEARCH_DATA_STORE','MULTI_COLUMN_DATASTORE');
       CTX_DDL.set_attribute('SEARCH_DATA_STORE','columns','abstract, srslt_category_id, srslt_sub_category_id, active_flag');
       CTX_DDL.set_attribute('SEARCH_DATA_STORE', 'FILTER','N,N,N,N');
       -- Create new section group preference.
       CTX_DDL.create_section_group ('SEARCH_DATA_STORE_SG','BASIC_SECTION_GROUP');
       CTX_DDL.add_field_section('SEARCH_DATA_STORE_SG', 'abstract',              'abstract',             TRUE);
       CTX_DDL.add_field_section('SEARCH_DATA_STORE_SG', 'srslt_category_id',     'srslt_category_id',    TRUE);
       CTX_DDL.add_field_section('SEARCH_DATA_STORE_SG', 'srslt_sub_category_id', 'srslt_sub_category_id',TRUE);
       CTX_DDL.add_field_section('SEARCH_DATA_STORE_SG', 'active_flag',           'active_flag',          TRUE);
    Here is the context Index
    CREATE INDEX SRCH_KEYWORD_SEARCH_I ON SRCH_KEYWORD_SEARCH_SME(ABSTRACT)
       INDEXTYPE IS CTXSYS.CONTEXT
          PARAMETERS('STORAGE search_storage_pref DATASTORE SEARCH_DATA_STORE SECTION GROUP SEARCH_DATA_STORE_SG' )
    Here is the Query # 1 I am trying out...
    SELECT /*+ FIRST_ROWS(10) */
           SCORE(1) score_nbr,
           k.SYS_ID,
           k.RESULT_TITLE,
    FROM   SRCH_KEYWORD_SEARCH_SME k
    WHERE  CONTAINS (k.ABSTRACT, '<query><textquery><progression><seq>{hitchhiker} WITHIN abstract</seq></progression></textquery></query>',1) > 0
    ORDER BY SCORE(1) DESC;
    Here is the result for Query # 1...
    score_nbr   sys_id     result_title
    54          99220      SME Releases New Book The Hitchhiker's Guide to Lean                                                                                                                                                                                                     72                                    
    43          116583     Lean Leadership Package                                                                                                                                                                                                                                         72                                    
    32          132392     The Hitchhikers Guide to Lean: Lessons from the Road                                                                                                                                                                                                           72                                    
    11          132017     Lean Manufacturing A Plant Floor Guide Book Summary                                                                                                                                                                                                            72                                    
    11          137106     Managing Factory Maintenance, Second Edition                                                                                                                                                                                                                    72                                    
    11          132082     Lean Pocket GuideHere is the Query # 2 I am trying out...
    SELECT /*+ FIRST_ROWS(10) */
           SCORE(1) score_nbr,
           k.SYS_ID,
           k.RESULT_TITLE,
    FROM   SRCH_KEYWORD_SEARCH_SME k
    WHERE  CONTAINS (k.ABSTRACT, '<query><textquery><progression><seq>{hitchhiker} WITHIN abstract AND Y WITHIN active_flag</seq></progression></textquery></query>',1) > 0
    ORDER BY SCORE(1) DESC
    Here is the result for Query # 2...
    score_nbr sys_id     result_title
    3         132017     Lean Manufacturing: A Plant Floor Guide Book Summary                                                                                                                                                                                                            72                                    
    3         137106     Managing Factory Maintenance, Second Edition                                                                                                                                                                                                                    72                                    
    3         132082     Lean Pocket Guide                                                                                                                                                                                                                                               72                                    
    3         132083     The Toyota Way: 14 Management Principles From the World's Greatest...                                                                                                                                                                                           72                                    
    3         132417     Lean Manufacturing: A Plant Floor Guide                                                                                                                                                                                                                         72                                    
    3         132091     Breaking the Cost Barrier: A Proven Approach to Managing and...                                                                                                                                                                                                 72                                    
    3         99318      Conflicting pairs                                                                                                                                                                                                                                               72                                    
    3         132393     One-Piece Flow: Cell Design for Transforming the Production Process                                                                                                                                                                                             72                                    
    3         137091     Learning to See: Value Stream Mapping to Create Value & Eliminate MUDA                                                                                                                                                                                          72                                    
    3         137090     The Purchasing Machine: How the Top 10 Companies Use Best Practices...                                                                                                                                                                                          72                                    
    3         137393     Passion for Manufacturing My question is, why did the scoring went all the way to 3 for ALL the results the above query returned when I used the AND clause
    and added the 2nd column used in the datastore for my query condition..
    Also I want to use progressive relaxation technique in the queries to use stemming & fuzzy search option too.
    Help me out please....
    Thanks in advance.
    - Richard.

    Yes, it's in the doc - it's known as the weight operator.
    http://download.oracle.com/docs/cd/B28359_01/text.111/b28304/cqoper.htm#i998379
    "term*n      Returns documents that contain term. Calculates score by multiplying the raw score of term by n, where n is a number from 0.1 to 10."
    We're just using the operator twice as the limit on "n" is 10 (for no obvious reason I know of!). This is perfectly safe, and common practice.

  • Concatenated datastore fuzzy searches and performance...

    Oracle 8.1.7:
    I am using the concatenated datastore and indexing two columns.
    The query I am executing includes an exact match on one column and a fuzzy match on the second column.
    When I execute the query, performance should improve as the exact match column is set to return less values.
    This is the case when we execute an exact match search on both columns.
    However, when one column is an exact match and the second column is a fuzzy match this is not true.
    Is this normal processing??? and why??? Is this a bug??
    If you need more information please let me know.
    We are under a deadline and this is our final road block.
    TIA
    Colleen GEislinger

    This is more information about our scenario:
    We have two groups in the datastore:
    concat:
    1.) hierarchy:(example text) 321826 325123 543123
    2.) page: Actual document text.
    321826 325123 543123 represents ids in a hierarchy structure. As you move from left to right the number of times the number occurs is less so there should be less exact matches.
    Example: In this index all pages have 321826 as the first value. A few pages have 543123 and all others will have some other number as the last value.
    if I do this query:
    contains(concat,(321826 within hierarchy ) and ('personnel') within page)
    it takes about 10 seconds because it 321826 will hit all pages.
    if I do this query:
    contains(concat,(543123 within hierarchy ) and ('personnel') within page)
    it takes only about 1 second because it 543123 will hit just a few pages.
    BUT:::::::
    Fuzzy search....
    if I do this query:
    search A.) contains(concat,(321826 within hierarchy ) and ?('personnel') within page)
    it takes about 30 seconds because it 321826 will hit all pages. This is okay for performance for this.
    BUT if I do this query:
    search B.) contains(concat,(543123 within hierarchy ) and ?('personnel') within page)
    it takes about 30 seconds even though 543123 will hit only a few pages.
    This should be faster than 30 seconds because you're searching over only a fraction of material for the fuzzy search part.
    We've played with different variations on the () and the '' but nothing seems to change this.
    Any advice on how to make search B.) faster??
    We don't understand why see the different speeds in the exact match and we DON'T see the different speeds in the fuzzy search...
    I can send you some test data with the index and query scripts if you want.
    Our indexes are on large tables (2,000,000) rows.
    TIA
    Colleen Geislinger.

  • Problem with Concatened Datastore

    Hello,
    We try to implement the "Concatened Datastore". And we've got errors.
    So we download the zip file from the link "Download the kit" on the page http://www.oracle.com/technology/sample_code/products/text/htdocs/concatenated_text_datastore/cdstore_readme.html#Installation. We unzip the file and got several files.
    1) We try the "full_example" file, but the script "cdstore_10g_user" (line 12) don't exist ; sick.
    2) So, to workaround, we try to follow the instructions in the "full_example.sql" file, with little corrections :-)). We create a user test_user, we load the cdstore.sql file, and here, we'got some errors. One for table they don't exist (ORA-00942 ; the first time it's normal. New tables don't exist), and one other for an invalid identifier (ORA-00904). Here the exact log :
    Warning: Package Body created with compilation errors.
    Errors for PACKAGE BODY CTX_CD:
    LINE/COL ERROR
    48/7 PL/SQL: SQL Statement ignored
    51/16 PL/SQL: ORA-00904: "CDSTORE_NAME": invalid identifier
    3) We continue the "full_example.sql" file. Create a table mytab for the test_user, insert data into this table, drop data into cdstore. And when we try to create a new cdstore, we've got this error :
    SQL> prompt new...
    begin
    ctx_cd.create_cdstore('my2_cdstore', 'mytab');
    end;
    new...
    SQL> 2 3 4 begin
    ERROR at line 1:
    ORA-04063: package body "TEST_USER.CTX_CD" has errors
    ORA-06508: PL/SQL: could not find program unit being called: "TEST_USER.CTX_CD"
    ORA-06512: at line 2
    Is there anyone, who can tell us what's wrong ?
    Best regards
    Laurent PELLETIER

    ATTENTION ROGER FORD
    It looks like you need to make a few fixes to your full_example.sql and cdstore.sql. It looks like there are some mismatches between names of scripts and what is called and between names of tables created and selected from and so forth and some missing values for inserts. When I initially ran it with the cdstore.sql under the scott schema it ran o.k. because it was using the old definitions from the previous version, but then it wouldn't run under the test_user, so I suspect it was using the old definitions when you tested as well. After making the following corrections, it ran successfully with the test_user.
    -- changes to full_example.sql:
    --   changed password for system (not a bug)
    --   changed @cdstore_10g_user to @cdstore
    -- changes to cdstore.sql:
    --   first: 
    --     changed each occurrence of ctx_cdstore to ctx_user_cdstore
    --   then:
    --     added column cdstore_name varchar2(30) to ctx_user_cdstore_cols table:
    --       create table ctx_user_cdstore_cols (... cdstore_name varchar2(30) ...) 
    --     added cdstore_name and l_name to both inserts into ctx_user_cdstore_cols:
    --       insert into ctx_user_cdstore_cols (... cdstore_name ...)
    --       values (... l_name ...)

  • Oracle Text Concatenated Datastore

    I have read this:
    http://www.oracle.com/technology/sample_code/products/text/htdocs/concatenated_text_datastore/cdstore_readme.html
    I've been trying to follos the 'Installation' section.
    I've downloaded cdstore.sql but I get error ORA-00942 (table does not exist) because ctx_user_cdstore_cols does not exist (at line 618 in the file).
    Indeed, the table created is 'ctx_cdstore_cols' and not 'ctx_user_cdstore_cols'.
    I've changed it to ctx_cdstore_cols and now get ORA-00904 because CDSTORE_NAME is not a column of ctx_cdstores.
    Anyway, I believe that this code should work as is so there is something big I must be missing.
    Has anyone managed to install this package and how please?

    It's not a problem with the concatenated datastore, it's about operator precedence.
    If you search for 'A or B within SECTION', "within" has a higher precedence than "or", so this becomes 'A or (B within SECTION)'. What you need to say is '(A or B) within SECTION', or in your case '(BROOKS or BONDS) within name'
    Hope this helps.
    Roger

  • User Datastore for multiple tables and columns!

    Hi,
    I hop so much, someone can help me.
    I've made a user datastore to index multiple columns of multiple tables.
    Now, the Documentation of Oracle explains the idexing of one table.
    I have multiple tables, which have all, the columns descr and tagnr. I want to make a query sth like this:
    select table1.column, table2.columnd... where contains(indexed field,'gas within descr',1)>0
    is it possible to index 4 seperate tables, without having a collective key? I dont want to make a Concatenated Datastore.
    I have wrote this code.
    But it doesn't work. It's been compiled fine. But I don't get any result with my queries.
    create or replace
    procedure My_Proc_Wide
    Must be in ctxsys schema.
    In a full-scale example, this would be a wrapper
    for a proc in the user schema.
    rid in rowid,
    tlob in out NOCOPY clob /* NOCOPY instructs Oracle to pass
    this argument as fast as possible */
    is
    v_descr varchar2(80);
    v_tagnr varchar2(30);
    v_descr_name constant varchar2(20) := 'descr';
    v_descr_start_tag constant varchar2(20) := '<' || v_descr_name || '>';
    v_descr_end_tag constant varchar2(20) := '</' || v_descr_name || '>';
    v_tagnr_name constant varchar2(20) := 'tagnr';
    v_tagnr_start_tag constant varchar2(20) := '<' || v_tagnr_name || '>';
    v_tagnr_end_tag constant varchar2(20) := '</' || v_tagnr_name || '>';
    v_buffer varchar2(4000);
    v_length integer;
    begin
    /* verify the env which called this */
    if Dbms_Lob.Istemporary ( tlob ) <> 1
    then
    raise_application_error ( -20000,
    '"IN OUT" tlob isn''t temporary' );
    end if;
    /* the real logic */
    /* first tabel to be indexed */
    select t1.tagnr, t1.descr
    into v_tagnr, v_descr
    from tweb.pdp_positions t1
    where t1.rowid = rid;
    v_buffer := v_tagnr_start_tag ||
    v_tagnr ||
    v_tagnr_end_tag ||
    v_descr_start_tag ||
         v_descr ||
         v_descr_end_tag;
    v_length := length ( v_buffer );
    Dbms_Lob.WriteAppend(tlob, length(v_buffer) + 1, v_buffer || ' ');
    /* second table to be indexed */
    select t2.tagnr, t2.descr
    into v_tagnr, v_descr
    from tweb.pdp_schema_equ t2
    where t2.rowid = rid;
         v_buffer := v_tagnr_start_tag ||
    v_tagnr ||
    v_tagnr_end_tag ||
    v_descr_start_tag ||
         v_descr ||
         v_descr_end_tag;
    v_length := length ( v_buffer );
    Dbms_Lob.WriteAppend(tlob, length(v_buffer) + 1, v_buffer || ' ');
    /*third table to be indexed */
    select t3.tagnr, t3.descr
    into v_tagnr, v_descr
    from tweb.pdp_equipment t3
    where t3.rowid = rid;
         v_buffer := v_tagnr_start_tag ||
    v_tagnr ||
    v_tagnr_end_tag ||
    v_descr_start_tag ||
         v_descr ||
         v_descr_end_tag;
    v_length := length ( v_buffer );
    Dbms_Lob.WriteAppend(tlob, length(v_buffer) + 1, v_buffer || ' ');
    /* fourth table to be indexed */
    select t4.tagnr, t4.descr
    into v_tagnr, v_descr
    from tweb.pdp_Projcode t4
    where t4.rowid = rid;
         v_buffer := v_tagnr_start_tag ||
    v_tagnr ||
    v_tagnr_end_tag ||
    v_descr_start_tag ||
         v_descr ||
         v_descr_end_tag;
    v_length := length ( v_buffer );
    Dbms_Lob.WriteAppend(tlob, length(v_buffer) + 1, v_buffer || ' ');
    end My_Proc_Wide;
    what have I to do, to make this work?
    Any Help would be appriciated!!
    Kind Regards,
    Arsineh

    Arsineh,
    I realise that it has been quite some time since you posted this question but I thought I'd reply just in case you never did manage to get your user datastore working.
    The reason your procedure will not work is simple. A user datastore procedure accepts a rowid input parameter. The rowid is the ID of the row that Oracle Text is currently trying to index. In the example you have given, you are attempting to use the supplied rowid as the primary key for multiple tables, this will simply never work as the rowid's across multiple tables will never correspond.
    The best way to achieve your goal is to create the index on a master table which contains the common primary keys for each of your four tables e.g.
    MASTER_TABLE
    COL:COMMON_KEY (NUMBER(n))
    COL:USER_INDEX_COLUMN (VARCHAR2(1))
    If you create the user datastore index on the MASTER_TABLE.USER_UNDEX_COLUMN column your stored proc simply needs to read the correct row from the MASTER_TABLE (SELECT t.common_key into v_CommonKey FROM master_table t WHERE t.rowid = rid) and issue subsequent queries to extract the relavant data from the t1..t4 tables using the common key e.g.
    SELECT t1.tagnr, t1.descr into v_tagnr, v_descr FROM t1 WHERE t1.[PRIMARY_KEY_FIELD] = v_CommonKey;
    SELECT t2.tagnr, t2.descr into v_tagnr, v_descr FROM t2 WHERE t2.[PRIMARY_KEY_FIELD] = v_CommonKey;
    and so on...
    Hope this helps
    Dean

  • Duplicate rows returned by contex index

    Hi
    I have a context index - locally partitioned with concatenated datastore.
    When I run a query on this it gives me duplicate rows (But for some rare cases only).
    Is this a bug in Oracle text?
    The table is partitioned on column norm_state_query - This query gives a duplicate -
    select rowid
    from mv_borrower_branch_details
    where contains ( norm_state_query, '( ( (fuzzy(${TATA},60,20,n) OR fuzzy(${PGIMENTS},60,20,n) OR fuzzy(${TATAPGIMENTS},60,20,n)) within norm_concat_name ) ) and ( ( ({43} OR fuzzy(${CHOWRINGHEE},60,20,n) ) within norm_concat_address ) )', 1 ) > 0
    and norm_state_query = 'WEST BENGAL'
    AAAKOGAAPAAAETMAAQ
    AAAKOGAAPAAAETMAAQ
    Thanks and regards
    Pratap

    Have you changed the partition definitions since you first created the index?
    Maybe that could cause the problem.
    Otherwise, it does sound like a bug. Please contact support so they can work
    through it with you.

  • Indexing Multiple columns Doesn't work

    Here's some help for those of you struggling
    with the interMedia sample code for:
    "Faster Multi-column Text Searches"
    Basically, after you have run the code
    cdstore.sql as CTXSYS and granted CTXAPP
    to whoever, you are now in a position to
    create your concatenated datastore.
    Once you have created your datastore, you
    create your index, specifying a single
    column and the datastore. Your queries to
    this index will 'magically' search the full
    list of columns in the datastore, even though
    you only specify a single column in the
    contains part of your query. V.Cool :)
    This work for a while until (like I did) you
    start to change some of your indexes. Then
    when you run a simple query and you get no
    rows back AT ALL. This is because your new
    index hasn't created properly due to a bug.
    You can check this out with the query:
    select err_text from ctx_user_index_errors;
    If your index is corrupt, you should see:
    DRG-50857: oracle error in drsinopen
    DRG-50858: OCI error: OCI_INVALID_HANDLE
    This is due to the fact that a create
    index statement will work only ONCE
    in a given session. This is Bug #881851
    You can patch this bug, or use 8.1.6 instead.
    The current workaround, is to reconnect to
    the database and recreate the index.
    (OK,so it's a misleading title, since it
    actually does work, but I found this rather
    puzzling and it's not easy to find in the
    documentation)
    Adeeva.

    Here's some help for those of you struggling
    with the interMedia sample code for:
    "Faster Multi-column Text Searches"
    Basically, after you have run the code
    cdstore.sql as CTXSYS and granted CTXAPP
    to whoever, you are now in a position to
    create your concatenated datastore.
    Once you have created your datastore, you
    create your index, specifying a single
    column and the datastore. Your queries to
    this index will 'magically' search the full
    list of columns in the datastore, even though
    you only specify a single column in the
    contains part of your query. V.Cool :)
    This work for a while until (like I did) you
    start to change some of your indexes. Then
    when you run a simple query and you get no
    rows back AT ALL. This is because your new
    index hasn't created properly due to a bug.
    You can check this out with the query:
    select err_text from ctx_user_index_errors;
    If your index is corrupt, you should see:
    DRG-50857: oracle error in drsinopen
    DRG-50858: OCI error: OCI_INVALID_HANDLE
    This is due to the fact that a create
    index statement will work only ONCE
    in a given session. This is Bug #881851
    You can patch this bug, or use 8.1.6 instead.
    The current workaround, is to reconnect to
    the database and recreate the index.
    (OK,so it's a misleading title, since it
    actually does work, but I found this rather
    puzzling and it's not easy to find in the
    documentation)
    Adeeva.

  • Newbie's ctx_cd query not working

    I've been trying to get a ctx_cd concatenated datastore query to work, but I keep getting weird error messages.
    the code to create the index:
    exec ctx_cd.drop_cdstore('imglib_cd');
    exec ctx_cd.Create_CDstore(cdstore_name =>'imglib_cd', table_name=>'imglib')
    exec ctx_cd.Add_Column('imglib_cd','format','format')
    exec ctx_cd.Add_Column('imglib_cd','keywords','keywords')
    exec ctx_cd.Add_Column('imglib_cd','submitted_by','submitted_by')
    exec ctx_cd.Add_Column('imglib_cd','county','county')
    exec ctx_cd.Add_Column('imglib_cd','facility','facility')
    exec ctx_cd.Add_Column('imglib_cd','project','project')
    exec ctx_cd.Add_Column('imglib_cd','year','year')
    exec ctx_cd.Add_Column('imglib_cd','print_web', 'PRINT_WEB')
    exec ctx_cd.Add_Update_Trigger('imglib_cd','format')
    exec ctx_cd.Add_Update_Trigger('imglib_cd','keywords')
    exec ctx_cd.Add_Update_Trigger('imglib_cd','submitted_by')
    exec ctx_cd.Add_Update_Trigger('imglib_cd','county')
    exec ctx_cd.Add_Update_Trigger('imglib_cd','facility')
    exec ctx_cd.Add_Update_Trigger('imglib_cd','project')
    exec ctx_cd.Add_Update_Trigger('imglib_cd','year')
    exec ctx_cd.Add_Update_Trigger('imglib_cd','print_web')
    exec ctx_ddl.drop_preference(preference_name => 'img_lexer');
    exec ctx_ddl.create_preference(preference_name =>'img_lexer',object_name=>'basic_lexer');
    exec ctx_ddl.set_attribute(preference_name =>'img_lexer',attribute_name=>'index_text',attribute_value=>'true');
    exec ctx_ddl.set_attribute(preference_name=>'img_lexer',attribute_name=>'index_themes',attribute_value =>'false');
    drop index imglibindex;
    select err_text from ctx_user.errors;
    create index imglibindex ON imglib(concat) INDEXTYPE IS ctxsys.context
    PARAMETERS('datastore imglib_cd lexer img_lexer section group imglib_cd');
    the table structure:
    SQL> desc imglib;
    Name Null? Type
    ID NOT NULL NUMBER
    FORMAT VARCHAR2(50)
    DATE_UPLOADED DATE
    PRINT_WEB VARCHAR2(10)
    DPI NUMBER
    MEASUREMENT VARCHAR2(10)
    WIDTH NUMBER
    HEIGHT NUMBER
    KEYWORDS VARCHAR2(1000)
    FILE_SIZE NUMBER
    SUBMITTED_BY VARCHAR2(80)
    URL VARCHAR2(80)
    COUNTY VARCHAR2(50)
    FACILITY VARCHAR2(50)
    PROJECT VARCHAR2(50)
    YEAR VARCHAR2(10)
    CONCAT CHAR(1)
    checking to see if PRINT_WEB exists in User Sections:
    SQL> select sec_name from ctx_user_sections;
    SEC_NAME
    SUBMITTED_BY
    COUNTY
    FACILITY
    PROJECT
    YEAR
    PRINT_WEB
    FORMAT
    KEYWORDS
    8 rows selected.
    the query and the error:
    SQL> SELECT ID, URL, COUNTY, FACILITY, PROJECT, YEAR FROM IMGLIB WHERE CONTAINS(PRINT_WEB,'web withi
    n PRINT_WEB')>0;
    SELECT ID, URL, COUNTY, FACILITY, PROJECT, YEAR FROM IMGLIB WHERE CONTAINS(PRINT_WEB,'web within PRI
    ERROR at line 1:
    ORA-20000: interMedia Text error:
    DRG-10837: section PRINT_WEB does not exist

    I just discovered the problem.
    here's the successful query:
    SELECT ID, URL, COUNTY, FACILITY, PROJECT, YEAR FROM IMGLIB WHERE CONTAINS(CONCAT,'web within PRINT_WEB')>0

  • TREX Full-Text search on Solution Directory

    Hi Experts,
    I have a problem with Full-Text search on the Solution Directory.  Basically it doesn't work at all.
    In transaction SOLUTION_MANAGER I choose a solution and then ->Operation Setup -> Solution Settings.  At that point from the top menu I choose Solution Directory -> Find Document...
    When I trigger the search using normal attributes the process finds documents related to this Solution without any problem.  However, when I search using the "Full-Text Search" feature, the process doesn't find any document at all even though they exist.
    Why is this functionality not working?  Is this problem related to TREX?
    What should i do to fix it?  How do I create an index for these documents?
    I haven't been able to solve this issue as TREX seams to work fine... can anybody help me out?
    Any idea?
    Many thanks,
    Aldo

    David:
    I want to know if Oracle Context Option to need run over Oracle Application Server for to work search over multiple tables???
    Exist some method for this (Context) run without to use Oracle Application Server???
    select * from table_name where
    contains(column_name1, 'keywords')>0 AND
    contains(column_name2, 'keywords')>0However, using the Concatenated Datastore to create one index that has all the columns to be searched as sections will get better performance, since your query then only needs to use one contains statement across one index.
    select * from table_name where
    contains(indexed_column_name,
    '(keywords WITHIN section_name1) AND
    (keywords WITHIN section_name2) AND
    keyords')>0Note: The last keyword in this query is so you search the indexed column as well, which is not a section. You could also create a dummy column to create the index on, and make all columns to search sections of that.
    Cheers
    David<HR></BLOCKQUOTE>
    null

  • Full text search in a dynamic table

    Hi all,
    Can any one tell me how to do a full text search in a dynamic(ie. always have INSERT or DELETE action) table? I created a context index on the column which data type is LONG. But I can't get search results for those records that I inserted new data after Creating index.
    Thanks a lot!

    David:
    I want to know if Oracle Context Option to need run over Oracle Application Server for to work search over multiple tables???
    Exist some method for this (Context) run without to use Oracle Application Server???
    select * from table_name where
    contains(column_name1, 'keywords')>0 AND
    contains(column_name2, 'keywords')>0However, using the Concatenated Datastore to create one index that has all the columns to be searched as sections will get better performance, since your query then only needs to use one contains statement across one index.
    select * from table_name where
    contains(indexed_column_name,
    '(keywords WITHIN section_name1) AND
    (keywords WITHIN section_name2) AND
    keyords')>0Note: The last keyword in this query is so you search the indexed column as well, which is not a section. You could also create a dummy column to create the index on, and make all columns to search sections of that.
    Cheers
    David<HR></BLOCKQUOTE>
    null

  • Index Multiple Column of Multiple Tables

    Hi All,
    I would like to know how to create a index which can search through all column in my database tables. Eg: I have 30
    tables and every tables have around 10 columns. I want to create a index which can search through the columns in
    these tables.
    I know that User_DataStore can helps in create multiple column search across multiple tables. But in my case the BLOB
    created will be very huge. Any work around? I mean is there any solutions like concatenated datastore?
    Thank You.
    Regards,
    LG Tan

    Hi,
    I figured out how to do this today. The first thing is that the type of index you need is a USER_DATASTORE.
    The idea behind this type of index is pretty straight forward but the documentation does a very good job of not drawing attention to just how powerful it is.
    The idea behind a USER_DATASTORE is that you can write your own stored procedure to extract the data that you want to index and return it to the indexer. Take an example where you have a master table which contains enough information to allow you to find associated data in other tables i.e. a shared key. The idea is that when you set up a USER_DATASTORE index, you specify the name of a stored procedure that the indexer will call for each row in the master table. The stored procedure has one input and one output parameter, rowid (in) and clob (out).
    When the index is created, the stored procedure you specify is, as I said above, called for each row in the master table. Your stored procedure uses this ROWID to extract the shared key (this can be anything you want) from the master table and uses this to build the necessary SELECT statement to retrieve the related data from the other tables. The rest of the stored procedure simply appends the data returned from your select statement to the return CLOB. The indexer then indexes the inforamation in this CLOB and discards the data.
    The index can of course only return hits against the master table. It's up to your application to extract shared key from the returned row(s), bind to the other tables and present the results.
    You will find a basic example of how to implement USER_DATASTORES in the Oracle Text Reference Guide (http://download.oracle.com/otndoc/oracle9i/901_doc/text.901/a90121.pdf). Feel free to email me if you want some example code.
    Dean

Maybe you are looking for

  • How much RAM can my 2.2GHz Intel Core 2 Duo Hold?

    Hello everybody. My question, as written in the subject, is about the RAM in my 2.2GHz Intel Core 2 Duo Macbook Pro. I currently have 2GB and would like to move up to four. Can think particular model hold 4GB of RAM total? I believe the answer is yes

  • Can I move photos from my Homepage to my .web site?

    I have several slideshows on an old Homepage website that I am replacing with a new iweb website. Can the slideshows be moved over or must they be rebuilt from scratch on the iweb site?

  • Cover-flow and Album-art problems

    On cover-flow, sometimes background album-art will jump ahead of the viewed (center) album. (iPhone 5, iOS 6.0.1) can I fix this? Also, in the lock screen (same iPhone) the album-art will not be in the center of the screen, but down about half way th

  • Cancellation of billing document through VF11

    Cancellation of billing document through VF11

  • Budget structure problem of internal companies ..

    Hi experts, I am having problem for creating and using the structure below ,as I wanted. I am trying to find a solution which I could not get to so far. Here is my case ; I have 3 companies.They make budget planning in the same platform since they ar