Bug in Oracle Text?

I'm being presumptuous, but:
SQL> drop table foo
Table dropped.
SQL> create table foo (
id NUMBER,
mystring VARCHAR2(1))
Table created.
SQL> insert into foo (id,mystring) values (1,'A')
1 row created.
SQL> insert into foo (id,mystring) values (2,'B')
1 row created.
SQL> insert into foo (id,mystring) values (3,'C')
1 row created.
SQL> insert into foo (id,mystring) values (4,'D')
1 row created.
SQL> insert into foo (id,mystring) values (5,'E')
1 row created.
SQL> commit
Commit complete.
SQL> BEGIN
CTX_DDL.DROP_PREFERENCE('FOO_LEXER');
END;
PL/SQL procedure successfully completed.
SQL> BEGIN
CTX_DDL.CREATE_PREFERENCE('FOO_LEXER','BASIC_LEXER');
CTX_DDL.SET_ATTRIBUTE('FOO_LEXER','BASE_LETTER','YES');
END;
PL/SQL procedure successfully completed.
SQL> CREATE INDEX foo_index ON foo(mystring)
INDEXTYPE IS CTXSYS.CONTEXT
PARAMETERS('lexer foo_lexer')
Index created.
SQL> select *
from foo
where contains(mystring,'A') > 0
no rows selected
SQL> select *
from foo
where contains(mystring,'B') > 0
ID M
2 B
1 row selected.
SQL> select *
from foo
where contains(mystring,'c') > 0
ID M
3 C
1 row selected.
SQL> select *
from foo
where contains(mystring,'d') > 0
ID M
4 D
1 row selected.
SQL> select *
from foo
where contains(mystring,'E') > 0
ID M
5 E
1 row selected.
It only fails for the letter 'A'!

This is actually because 'A' is a stopword. This is expected.
Try doing:
Select token_text from DR$[index_name]$I;
and you will not find the letter 'A' indexed.
Try doing:
select spw_stoplist, spw_word from ctx_stopwords order by 1, 2;
You should see something like:
SPW_STOPLIST SPW_WORD
DEFAULT_STOPLIST Mr
DEFAULT_STOPLIST Mrs
DEFAULT_STOPLIST Ms
DEFAULT_STOPLIST a
DEFAULT_STOPLIST all
DEFAULT_STOPLIST almost
DEFAULT_STOPLIST also
DEFAULT_STOPLIST although
DEFAULT_STOPLIST an
DEFAULT_STOPLIST and
DEFAULT_STOPLIST any
DEFAULT_STOPLIST are
.

Similar Messages

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

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

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

  • Pre-loading Oracle text in memory with Oracle 12c

    There is a white paper from Roger Ford that explains how to load the Oracle index in memory : http://www.oracle.com/technetwork/database/enterprise-edition/mem-load-082296.html
    In our application, Oracle 12c, we are indexing a big XML field (which is stored as XMLType with storage secure file) with the PATH_SECTION_GROUP. If I don't load the I table (DR$..$I) into memory using the technique explained in the white paper then I cannot have decent performance (and especially not predictable performance, it looks like if the blocks from the TOKEN_INFO columns are not memory then performance can fall sharply)
    But after migrating to oracle 12c, I got a different problem, which I can reproduce: when I create the index it is relatively small (as seen with ctx_report.index_size) and by applying the technique from the whitepaper, I can pin the DR$ I table into memory. But as soon as I do a ctx_ddl.optimize_index('Index','REBUILD') the size becomes much bigger and I can't pin the index in memory. Not sure if it is bug or not.
    What I found as work-around is to build the index with the following storage options:
    ctx_ddl.create_preference('TEST_STO','BASIC_STORAGE');
    ctx_ddl.set_attribute ('TEST_STO', 'BIG_IO', 'YES' );
    ctx_ddl.set_attribute ('TEST_STO', 'SEPARATE_OFFSETS', 'NO' );
    so that the token_info column will be stored in a secure file. Then I can change the storage of that column to put it in the keep buffer cache, and write a procedure to read the LOB so that it will be loaded in the keep cache. The size of the LOB column is more or less the same as when creating the index without the BIG_IO option but it remains constant even after a ctx_dll.optimize_index. The procedure to read the LOB and to load it into the cache is very similar to the loaddollarR procedure from the white paper.
    Because of the SDATA section, there is a new DR table (S table) and an IOT on top of it. This is not documented in the white paper (the white paper was written for Oracle 10g). In my case this DR$ S table is much used, and the IOT also, but putting it in the keep cache is not as important as the token_info column of the DR I table. A final note: doing SEPARATE_OFFSETS = 'YES' was very bad in my case, the combined size of the two columns is much bigger than having only the TOKEN_INFO column and both columns are read.
    Here is an example on how to reproduce the problem with the size increasing when doing ctx_optimize
    1. create the table
    drop table test;
    CREATE TABLE test
    (ID NUMBER(9,0) NOT NULL ENABLE,
    XML_DATA XMLTYPE
    XMLTYPE COLUMN XML_DATA STORE AS SECUREFILE BINARY XML (tablespace users disable storage in row);
    2. insert a few records
    insert into test values(1,'<Book><TITLE>Tale of Two Cities</TITLE>It was the best of times.<Author NAME="Charles Dickens"> Born in England in the town, Stratford_Upon_Avon </Author></Book>');
    insert into test values(2,'<BOOK><TITLE>The House of Mirth</TITLE>Written in 1905<Author NAME="Edith Wharton"> Wharton was born to George Frederic Jones and Lucretia Stevens Rhinelander in New York City.</Author></BOOK>');
    insert into test values(3,'<BOOK><TITLE>Age of innocence</TITLE>She got a prize for it.<Author NAME="Edith Wharton"> Wharton was born to George Frederic Jones and Lucretia Stevens Rhinelander in New York City.</Author></BOOK>');
    3. create the text index
    drop index i_test;
      exec ctx_ddl.create_section_group('TEST_SGP','PATH_SECTION_GROUP');
    begin
      CTX_DDL.ADD_SDATA_SECTION(group_name => 'TEST_SGP', 
                                section_name => 'SData_02',
                                tag => 'SData_02',
                                datatype => 'varchar2');
    end;
    exec ctx_ddl.create_preference('TEST_STO','BASIC_STORAGE');
    exec  ctx_ddl.set_attribute('TEST_STO','I_TABLE_CLAUSE','tablespace USERS storage (initial 64K)');
    exec  ctx_ddl.set_attribute('TEST_STO','I_INDEX_CLAUSE','tablespace USERS storage (initial 64K) compress 2');
    exec  ctx_ddl.set_attribute ('TEST_STO', 'BIG_IO', 'NO' );
    exec  ctx_ddl.set_attribute ('TEST_STO', 'SEPARATE_OFFSETS', 'NO' );
    create index I_TEST
      on TEST (XML_DATA)
      indextype is ctxsys.context
      parameters('
        section group   "TEST_SGP"
        storage         "TEST_STO"
      ') parallel 2;
    4. check the index size
    select ctx_report.index_size('I_TEST') from dual;
    it says :
    TOTALS FOR INDEX TEST.I_TEST
    TOTAL BLOCKS ALLOCATED:                                                104
    TOTAL BLOCKS USED:                                                      72
    TOTAL BYTES ALLOCATED:                                 851,968 (832.00 KB)
    TOTAL BYTES USED:                                      589,824 (576.00 KB)
    4. optimize the index
    exec ctx_ddl.optimize_index('I_TEST','REBUILD');
    and now recompute the size, it says
    TOTALS FOR INDEX TEST.I_TEST
    TOTAL BLOCKS ALLOCATED:                                               1112
    TOTAL BLOCKS USED:                                                    1080
    TOTAL BYTES ALLOCATED:                                 9,109,504 (8.69 MB)
    TOTAL BYTES USED:                                      8,847,360 (8.44 MB)
    which shows that it went from 576KB to 8.44MB. With a big index the difference is not so big, but still from 14G to 19G.
    5. Workaround: use the BIG_IO option, so that the token_info column of the DR$ I table will be stored in a secure file and the size will stay relatively small. Then you can load this column in the cache using a procedure similar to
    alter table DR$I_TEST$I storage (buffer_pool keep);
    alter table dr$i_test$i modify lob(token_info) (cache storage (buffer_pool keep));
    rem: now we must read the lob so that it will be loaded in the keep buffer pool, use the prccedure below
    create or replace procedure loadTokenInfo is
      type c_type is ref cursor;
      c2 c_type;
      s varchar2(2000);
      b blob;
      buff varchar2(100);
      siz number;
      off number;
      cntr number;
    begin
        s := 'select token_info from  DR$i_test$I';
        open c2 for s;
        loop
           fetch c2 into b;
           exit when c2%notfound;
           siz := 10;
           off := 1;
           cntr := 0;
           if dbms_lob.getlength(b) > 0 then
             begin
               loop
                 dbms_lob.read(b, siz, off, buff);
                 cntr := cntr + 1;
                 off := off + 4096;
               end loop;
             exception when no_data_found then
               if cntr > 0 then
                 dbms_output.put_line('4K chunks fetched: '||cntr);
               end if;
             end;
           end if;
        end loop;
    end;
    Rgds, Pierre

    I have been working a lot on that issue recently, I can give some more info.
    First I totally agree with you, I don't like to use the keep_pool and I would love to avoid it. On the other hand, we have a specific use case : 90% of the activity in the DB is done by queuing and dbms_scheduler jobs where response time does not matter. All those processes are probably filling the buffer cache. We have a customer facing application that uses the text index to search the database : performance is critical for them.
    What kind of performance do you have with your application ?
    In my case, I have learned the hard way that having the index in memory (the DR$I table in fact) is the key : if it is not, then performance is poor. I find it reasonable to pin the DR$I table in memory and if you look at competitors this is what they do. With MongoDB they explicitly says that the index must be in memory. With elasticsearch, they use JVM's that are also in memory. And effectively, if you look at the awr report, you will see that Oracle is continuously accessing the DR$I table, there is a SQL similar to
    SELECT /*+ DYNAMIC_SAMPLING(0) INDEX(i) */    
    TOKEN_FIRST, TOKEN_LAST, TOKEN_COUNT, ROWID    
    FROM DR$idxname$I
    WHERE TOKEN_TEXT = :word AND TOKEN_TYPE = :wtype    
    ORDER BY TOKEN_TEXT,  TOKEN_TYPE,  TOKEN_FIRST
    which is continuously done.
    I think that the algorithm used by Oracle to keep blocks in cache is too complex. A just realized that in 12.1.0.2 (was released last week) there is finally a "killer" functionality, the in-memory parameters, with which you can pin tables or columns in memory with compression, etc. this looks ideal for the text index, I hope that R. Ford will finally update his white paper :-)
    But my other problem was that the optimize_index in REBUILD mode caused the DR$I table to double in size : it seems crazy that this was closed as not a bug but it was and I can't do anything about it. It is a bug in my opinion, because the create index command and "alter index rebuild" command both result in a much smaller index, so why would the guys that developped the optimize function (is it another team, using another algorithm ?) make the index two times bigger ?
    And for that the track I have been following is to put the index in a 16K tablespace : in this case the space used by the index remains more or less flat (increases but much more reasonably). The difficulty here is to pin the index in memory because the trick of R. Ford was not working anymore.
    What worked:
    first set the keep_pool to zero and set the db_16k_cache_size to instead. Then change the storage preference to make sure that everything you want to cache (mostly the DR$I) table come in the tablespace with the non-standard block size of 16k.
    Then comes the tricky part : the pre-loading of the data in the buffer cache. The problem is that with Oracle 12c, Oracle will use direct_path_read for FTS which basically means that it bypasses the cache and read directory from file to the PGA !!! There is an event to avoid that, I was lucky to find it on a blog (I can't remember which, sorry for the credit).
    I ended-up doing that. the events to 10949 is to avoid the direct path reads issue.
    alter session set events '10949 trace name context forever, level 1';
    alter table DR#idxname0001$I cache;
    alter table DR#idxname0002$I cache;
    alter table DR#idxname0003$I cache;
    SELECT /*+ FULL(ITAB) CACHE(ITAB) */ SUM(TOKEN_COUNT),  SUM(LENGTH(TOKEN_INFO)) FROM DR#idxname0001$I;
    SELECT /*+ FULL(ITAB) CACHE(ITAB) */ SUM(TOKEN_COUNT),  SUM(LENGTH(TOKEN_INFO)) FROM DR#idxname0002$I;
    SELECT /*+ FULL(ITAB) CACHE(ITAB) */ SUM(TOKEN_COUNT),  SUM(LENGTH(TOKEN_INFO)) FROM DR#idxname0003$I;
    SELECT /*+ INDEX(ITAB) CACHE(ITAB) */  SUM(LENGTH(TOKEN_TEXT)) FROM DR#idxname0001$I ITAB;
    SELECT /*+ INDEX(ITAB) CACHE(ITAB) */  SUM(LENGTH(TOKEN_TEXT)) FROM DR#idxname0002$I ITAB;
    SELECT /*+ INDEX(ITAB) CACHE(ITAB) */  SUM(LENGTH(TOKEN_TEXT)) FROM DR#idxname0003$I ITAB;
    It worked. With a big relief I expected to take some time out, but there was a last surprise. The command
    exec ctx_ddl.optimize_index(idx_name=>'idxname',part_name=>'partname',optlevel=>'REBUILD');
    gqve the following
    ERROR at line 1:
    ORA-20000: Oracle Text error:
    DRG-50857: oracle error in drftoptrebxch
    ORA-14097: column type or size mismatch in ALTER TABLE EXCHANGE PARTITION
    ORA-06512: at "CTXSYS.DRUE", line 160
    ORA-06512: at "CTXSYS.CTX_DDL", line 1141
    ORA-06512: at line 1
    Which is very much exactly described in a metalink note 1645634.1 but in the case of a non-partitioned index. The work-around given seemed very logical but it did not work in the case of a partitioned index. After experimenting, I found out that the bug occurs when the partitioned index is created with  dbms_pclxutil.build_part_index procedure (this enables  enables intra-partition parallelism in the index creation process). This is a very annoying and stupid bug, maybe there is a work-around, but did not find it on metalink
    Other points of attention with the text index creation (stuff that surprised me at first !) ;
    - if you use the dbms_pclxutil package, then the ctx_output logging does not work, because the index is created immediately and then populated in the background via dbms_jobs.
    - this in combination with the fact that if you are on a RAC, you won't see any activity on the box can be very frightening : this is because oracle can choose to start the workers on the other node.
    I understand much better how the text indexing works, I think it is a great technology which can scale via partitioning. But like always the design of the application is crucial, most of our problems come from the fact that we did not choose the right sectioning (we choosed PATH_SECTION_GROUP while XML_SECTION_GROUP is so much better IMO). Maybe later I can convince the dev to change the sectionining, especially because SDATA and MDATA section are not supported with PATCH_SECTION_GROUP (although it seems to work, even though we had one occurence of a bad result linked to the existence of SDATA in the index definition). Also the whole problematic of mixed structured/unstructured searches is completly tackled if one use XML_SECTION_GROUP with MDATA/SDATA (but of course the app was written for Oracle 10...)
    Regards, Pierre

  • Oracle Text release 11.2.0.3.0 mandatory Patches (Doc ID 1386945.1)

    I've been asked to draw people's attention to Support Note 1386945.1
    This covers problems that some users have experienced when upgrading existing Oracle Text installations to version 11.2.0.3.
    The most common problem is getting an error:
    ORA-07445: exception encountered: core dump [druhfind()+370]
    You could also see
    ORA-20000: Oracle Text error:
    DRG-50857: oracle error in textindexmethods.ODCIIndexInsert
    ORA-20000: Oracle Text error:
    DRG-10607: index meta data is not ready yet for queuing DML
    DRG-50857: oracle error in drdmlv
    ORA-01426: numeric overflow
    ORA-30576: ConText Option dictionary loading error
    ORA-06512: at "CTXSYS.DRUE", line 160
    ORA-06512: at "CTXSYS.TEXTINDEXMETHODS", line 752
    or
    DRG-10607: index meta data is not ready yet for queuing DML
    DRG-50857: oracle error in drdmlv
    ORA-01426: numeric overflow
    There may also be issues with IPV6 URLs and the URL data store.
    The recommended fixes are:
    Apply generic Patch 13258936 to fix the meta data corruption.
    Apply Patch 12960302 to fix the ORA-30576, DRG-10607 and ORA-1426 errors.
    Apply generic Patch 13366268 to fix the core dump in function druhfind() from 'create index' statement and the import problem. This patch contains also the fix for Bug 13352423.
    Apply Patch 12985184 to fix the IPv6 url problem.
    Roger

    Hi;
    Is Oracle Database 11g Release 2 (11.2.0.3.0) available for IBM AIX on POWER Systems (64-bit),Yes
    Or do we need to upgrade 11.2.0.1 to 11.2.0.3.0.Please clarifyYou dont need upgrade, download patchset from metalink and start your process.
    Also see:
    Oracle Database on Unix AIX,HP-UX,Linux,Mac OS X,Solaris,Tru64 Unix Operating Systems Installation and Configuration Requirements Quick Reference (8.0.5 to 11.2) [ID 169706.1]
    PS:Please dont forget to change thread status to answered if it possible when u belive your thread has been answered, it pretend to lose time of other forums user while they are searching open question which is not answered,thanks for understanding
    Regard
    Helios

  • Index creation in Oracle Text ???

    Hi,
    I have never used oracle text before.
    The background info is got corruption errors on database alert log, identified it is an oracle9.2.0.5 bug in aix 5.2, need to apply 9.2.0.6 patchset. Temporary solution provided by oracle support was to drop and recreate an index.
    My approach was to identify the index name, associated column, reverse engineer the object ddl, drop the index and re-create the index. Should have been straight forward. The difference is the column is of BLOB datatype. My index script failed with ORA-02327. I get errors on alert log saying missing index.
    Don't know how to re-create the index on BLOB column in a table.
    Any help, much appreciated.
    Thanks
    Murali

    Hi,
    For your recreation, check out CTX_REPORT.CREATE_INDEX_SCRIPT. It will generate all of the ddl that you need.
    Thanks,
    Ron

  • Extracting an oracle text indextype

    oracle version 10.2.0.5
    I am working on an old legacy database that has a custom indextype used by oracle text. I am not sure how to extract it. Export does not get it. I tried using
    dbms_metadata.get_ddl, I get object of type indextype not found in the schema. I am using the correct object and schema name. I found it in DBA_INDEXTYPES.
    I am not sure how to issue a create indextype based on what I found in dba_indextypes
    I cannot use data pump due to a bug that is version/platform/upgrade specific (not looking for help on this).
    I have not used oracle text often and whenever I used it, I used the built in create indextype.

    What does DBA_OBJECTS say about that index?
    :p

  • Oracle Text - Problem with filtering binary documents (.doc, .pdf, etc...)

    Hi, I have a problem with filtering binary documents (.doc, .pdf, etc...). I use SQL*PLUS for remote access to Oracle 10.2 on Linux and I create table:
    CREATE TABLE test (id NUMBER PRIMARY KEY, text VARCHAR2(100));
    I insert to this table:
    INSERT into test values(1, 'PATH/text1.doc‘);
    INSERT into test values(2,'PATH/text2.doc‘);
    and then:
    CREATE INDEX test_index ON test(text) indextype is ctxsys.context
    parameters (’datastore ctxsys.file_datastore
    filter ctxsys.auto_filter’);
    Message "Index created" is displayed, but objects: DR$test_index$I, DR$test_index$K, DR$test_index$N, DR$test_index$R and DR$test_index$P are empty => index wasn´t created probably.
    I don´t know, where is bug, either bug is somewhere in this code or on the server (wrong installation oracle or constraint privileges). Do you know in what is bug?

    The following is an excerpt from the 10g online documentation. Note the items that I have put in bold.
    "FILE_DATASTORE
    The FILE_DATASTORE type is used for text stored in files accessed through the local file system.
    Note:
    FILE_DATASTORE may not work with certain types of remote mounted file systems.
    FILE_DATASTORE has the following attribute(s):
    Table 2-4 FILE_DATASTORE Attributes
    Attribute Attribute Value
    path path1:path2:pathn
    path
    Specify the full directory path name of the files stored externally in a file system. When you specify the full directory path as such, you need only include file names in your text column.
    You can specify multiple paths for path, with each path separated by a colon (:) on UNIX and semicolon(;) on Windows. File names are stored in the text column in the text table.
    If you do not specify a path for external files with this attribute, Oracle Text requires that the path be included in the file names stored in the text column.
    PATH Attribute Limitations
    The PATH attribute has the following limitations:
    If you specify a PATH attribute, you can only use a simple filename in the indexed column. You cannot combine the PATH attribute with a path as part of the filename. If the files exist in multiple folders or directories, you must leave the PATH attribute unset, and include the full file name, with PATH, in the indexed column.
    On Windows systems, the files must be located on a local drive. They cannot be on a remote drive, whether the remote drive is mapped to a local drive letter."
    With accessible paths and files, you get something like:
    SCOTT@orcl_11g> CREATE TABLE test (id NUMBER PRIMARY KEY, text VARCHAR2(100));
    Table created.
    SCOTT@orcl_11g>
    SCOTT@orcl_11g>
    SCOTT@orcl_11g> INSERT into test values(1,'c:\oracle11g\banana.pdf');
    1 row created.
    SCOTT@orcl_11g> INSERT into test values(2,'c:\oracle11g\cranberry.pdf');
    1 row created.
    SCOTT@orcl_11g>
    SCOTT@orcl_11g> CREATE INDEX test_index ON test(text) indextype is ctxsys.context
      2  parameters ('datastore ctxsys.file_datastore
      3  filter ctxsys.auto_filter');
    Index created.
    SCOTT@orcl_11g>
    SCOTT@orcl_11g> select count(*) from dr$test_index$i
      2  /
      COUNT(*)
           608
    SCOTT@orcl_11g> In the following, I used a non-existent path and non-existent file name, which produces the same results as when you use a remote path that does not exist locally.
    SCOTT@orcl_11g> CREATE TABLE test (id NUMBER PRIMARY KEY, text VARCHAR2(100));
    Table created.
    SCOTT@orcl_11g>
    SCOTT@orcl_11g>
    SCOTT@orcl_11g> INSERT into test values(3,'c:\nosuchpath\nosuchfile.pdf');
    1 row created.
    SCOTT@orcl_11g>
    SCOTT@orcl_11g> CREATE INDEX test_index ON test(text) indextype is ctxsys.context
      2  parameters ('datastore ctxsys.file_datastore
      3  filter ctxsys.auto_filter');
    Index created.
    SCOTT@orcl_11g>
    SCOTT@orcl_11g> select count(*) from dr$test_index$i
      2  /
      COUNT(*)
             0
    SCOTT@orcl_11g>

  • Update Results not Displayed in Oracle Text search with Transactional Index

    Hi,
    I am working on a solution utilising Oracle Text to give me a probable list of matching records. The problem I have the table I am searching on is prepopulated with seed data and the application we are building is assigning a record and updating the details(columns) against it. This detail is what we are searching on using an Multi Column Datastore index which is refreshed every hr and also has the transactional parameter specified. Unfortunately the Transactional Index does not pick up the updated details, it only seems to work if I insert a new record (which will never happen). This to me sounds like a bug. Any assistance would be greatly appreciated.

    Barbara,
    I think you may have eluded to my problem. I haven't updated the "dummy" column
    The table structure is as follows:
    CREATE TABLE WAGN (
         WAGN               VARCHAR2(8) NOT NULL PRIMARY KEY,
         last_name          VARCHAR2(240),
         first_name          VARCHAR2(240),
         middle_name          VARCHAR2(240),
         date_of_birth     DATE,
         gender               VARCHAR2(1),
         status               VARCHAR2(1) NOT NULL,
         signature          RAW(64));
    The preference creation is:
    BEGIN
         ctx_ddl.create_preference('WAGN_NAME_SRCH', 'MULTI_COLUMN_DATASTORE');
         ctx_ddl.set_attribute('WAGN_NAME_SRCH', 'columns', 'last_name, first_name, middle_name, date_of_birth, gender');
    END;     
    The Index Creation statement is:
    CREATE INDEX wagn_srch_idx1 ON WAGN(signature) --Dummy Column
    INDEXTYPE IS ctxsys.CONTEXT
    PARAMETERS ('DATASTORE WAGN_NAME_SRCH SYNC(EVERY "SYSDATE+60/24/60" PARALLEL 10) TRANSACTIONAL');
    And a typical update statement is (contained with PL/SQL):
         UPDATE WAGN
              SET status = x_wagn_assigned_status,
                   last_name = p_employee_details.last_name,
                   first_name = p_employee_details.first_name,
                   middle_name = p_employee_details.middle_name,
                   date_of_birth = p_employee_details.date_of_birth,
                   gender = p_employee_details.gender
              WHERE WAGN = l_wagn;
    So my guess is that because the dummy column (signature) is not updated it is not being reflected in the transactional memory area.

  • Oracle Text index hangs(Oracle 11g linux enterprise edition)

    Hi guru,
    One very criticial and showstopper issue coming in Oracle Text Indexing.
    I have table ResourceTable(ResId,Contents blob ,docformat)
    I am creating text index on Contents column by using follwing command:
    create index [IndexName] on [TableName] (contents) indextype is ctxsys.context ('lexer mylex stoplist ctxsys.default_stoplist format column ISDOCFORMAT sync(every "sysdate+1/24") storage my_text_storage memory 200M')parallel 2
    I found there is one document of text/html type which hangs oracle text indexing thread.Oracle doest not give any error message keep using CPU 100% and no progress.
    I then create test table with same stucture and put this corrupted documet record in this table.and did indexing again but its not doing index /not ignoring it and hangs .We have also tried to use timeout feature of inso filter so that if such type of document comes at the time of indexing oracle text indexing process will bypass it after specific time interval but still same issue comes and oracle is not bypassing such faulty document.
    This is realy show stopper issue and any kind of help will be greatly appricited.

    You need to raise an SR with Oracle Support for this, and send them the file which is causing the hang. It should then be easy to investigate the problem and schedule a fix.
    If you don't have a support contract, you could send the file to me and I'll raise a bug. However, if we fix it you won't be able to get the fix until it appears in the next downloadable version.
    - Roger
    roger.ford @ oracle.com

  • 10gR2, Installation of Oracle Text: Data Mining license required?

    Hello all,
    1. I wonder if I have to obtain a Data Mining license if I want to use Oracle Text. Using DBCA I have to check "Data Mining" to be able to check "Oracle Text".
    2. Does Oracle Text work, when I previously removed data mining using "make -f ins_rdbms.mk dm_off; make -f ins_rdbms.mk ioracle"?
    Regards, Heiko

    Hello,
    I hava an additional question: how can I find out, which licenses I need?
    The installer forces me to install "Data Mining" to use "Oracle Text", but I can´t find any information why. Does Text use "Data Mining" functionality? Is it just a bug in the GUI? How can I verify, that I don´t have to get licenses for "Data Mining"?
    Thank you
    Klaus

  • Oracle Text progressive relaxation

    hello,
    We're in the process of evaluating Oracle Text search engine so far so good until yesterday when we added Synonyms to our progressive search criterion and it stop working depending on where we place the synonym search. If we place it first everything else stops working (stemming, fuzzy...) If we place it last then the synonym search stops working. I saw a reference to a bug in this conference that seemed similar to the problem, I believe it mentioned that it had been fixed in 10.2.0.3 (this is the version were on).
    The following is a sample of plsql code were executing
    select score(1), nm_resource, ADDR_RSRC_ST_LN_1, id_resource, ADDR_RSRC_CITY FROM caps_resource where
    CONTAINS (nm_resource,
         '<query>
         <textquery lang="ENGLISH" grammar="CONTEXT">' || res_name ||
         '<progression>
    <seq><rewrite>transform((TOKENS, ?{?, ?}?, ?AND?))</rewrite></seq>
    <seq><rewrite>transform((TOKENS, ??{?, ?}?, ?AND?))</rewrite>/seq>
    <seq><rewrite>transform((TOKENS, ?{?, ?}?, ?OR?))</rewrite></seq>
    <seq><rewrite>transform((TOKENS, ??{?, ?}?, ?OR?))</rewrite>/seq>
    <seq><rewrite>transform((TOKENS, ?{?, ?}?, ?ACCUM?))</rewrite></seq>
    <seq><rewrite>transform((TOKENS, ?{?, ?}?, ?NEAR?))</rewrite></seq>
    <seq>' || 'SYN(' || REPLACE('' || res_name || '', ' ', ',IMPACT_tst) AND SYN(') || ',IMPACT_tst)' || '</seq>
    </progression>
    </textquery>
    <score datatype="INTEGER" algorithm="default"/>
    </query>', 1)>0

    Here is a suggested alternative. I have used a syns function that I wrote for another user on another thread, that checks for all combinations of words that could amount to a synonym, up to the maximum number of words that you can specify as an input parameter. I have then used that in a separate contains clause and combined the score results, using the score derived from the synonym only when there is no score from the progressive rewrites, ordering by the progressive rewrites first. Also notice that the ordering must be done in an inner sub-query then the rows limited in an outer subquery. Otherwise it can select the first 100 rows, then order them, instead of the other way around, which can produce an entirely different result set.
    SCOTT@orcl_11g> CREATE TABLE caps_resource
      2    (nm_resource       VARCHAR2 (30))
      3  /
    Table created.
    SCOTT@orcl_11g> INSERT ALL
      2  INTO caps_resource VALUES ('Delagarza,Lorenzo')
      3  INTO caps_resource VALUES ('Diana De La Garza')
      4  INTO caps_resource VALUES ('De La Garza,Fred')
      5  INTO caps_resource VALUES ('somebody else')
      6  SELECT * FROM DUAL
      7  /
    4 rows created.
    SCOTT@orcl_11g> CREATE INDEX your_index ON caps_resource (nm_resource)
      2  INDEXTYPE IS CTXSYS.CONTEXT
      3  /
    Index created.
    SCOTT@orcl_11g> BEGIN
      2    CTX_THES.CREATE_THESAURUS ('impact_tst');
      3    CTX_THES.CREATE_RELATION ('impact_tst', 'Delagarza', 'SYN', 'De La Garza');
      4  END;
      5  /
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11g> create or replace function syns
      2    (p_words in varchar2,
      3       p_thes     in varchar2,
      4       p_num     in number default 3) -- maximum number of words per synonym phrase
      5       return varchar2
      6  as
      7    v_words_in      varchar2 (32767) := ltrim (p_words) || ' ';
      8    v_words_out     varchar2 (32767);
      9  begin
    10    while instr (v_words_in, '  ') > 0 loop
    11        v_words_in := replace (v_words_in, '  ', ' ');
    12    end loop;
    13    while length (v_words_in) > 1
    14    loop
    15        for i in reverse 1 .. least (p_num, (length (v_words_in) - length (replace (v_words_in, ' ', ''))))
    16        loop
    17          if instr (ctx_thes.syn (substr (v_words_in, 1, instr (v_words_in, ' ', 1, i) - 1), p_thes), '|') > 0
    18            or i = 1 then
    19            v_words_out := v_words_out
    20            || ' AND ('
    21            || ctx_thes.syn (substr (v_words_in, 1, instr (v_words_in, ' ', 1, i) - 1), p_thes)
    22            || ')';
    23            v_words_in := substr (v_words_in, instr (v_words_in, ' ', 1, i) + 1);
    24            exit;
    25          end if;
    26        end loop;
    27    end loop;
    28    return ltrim (v_words_out, ' AND ');
    29  end syns;
    30  /
    Function created.
    SCOTT@orcl_11g> show errors
    No errors.
    SCOTT@orcl_11g> VARIABLE res_name VARCHAR2 (100)
    SCOTT@orcl_11g> EXEC :res_name := 'De La Garza'
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11g> SELECT syns (:res_name, 'impact_tst') FROM DUAL
      2  /
    SYNS(:RES_NAME,'IMPACT_TST')
    ({DE LA GARZA}|{DELAGARZA})
    SCOTT@orcl_11g> SELECT the_score, nm_resource
      2  FROM   (select DECODE (score(1), 0, SCORE(2), SCORE(1)) AS the_score, nm_resource
      3            FROM   caps_resource
      4            where  CONTAINS (nm_resource,
      5            '<query>
      6            <textquery lang="ENGLISH" grammar="CONTEXT">' || :res_name ||
      7             '<progression>
      8                <seq><rewrite>transform((TOKENS, "{",  "}", "AND"))</rewrite></seq>
      9                <seq><rewrite>transform((TOKENS, "?{", "}", "AND"))</rewrite>/seq>
    10                <seq><rewrite>transform((TOKENS, "{",  "}", "OR"))</rewrite></seq>
    11                <seq><rewrite>transform((TOKENS, "?{", "}", "OR"))</rewrite>/seq>
    12                <seq><rewrite>transform((TOKENS, "{",  "}", "ACCUM"))</rewrite></seq>
    13                <seq><rewrite>transform((TOKENS, "{",  "}", "NEAR"))</rewrite></seq>
    14              </progression>
    15            </textquery>
    16            <score datatype="INTEGER" algorithm="default"/>
    17             </query>', 1) > 0
    18            OR     CONTAINS (nm_resource, syns (:res_name, 'impact_tst'), 2) > 0
    19            ORDER  BY SCORE (1) DESC, SCORE (2) DESC)
    20  WHERE  ROWNUM < 100
    21  /
    THE_SCORE NM_RESOURCE
            76 Diana De La Garza
            76 De La Garza,Fred
             5 Delagarza,Lorenzo
    SCOTT@orcl_11g>

  • Sequences used within Oracle TExt

    Are there any sequences that are used by Oracle Text which might benefit from increasing the cache_size?
    Regards

    Hi,
    IDGEN1$ is not only used for indexing, but for more general cases in Oracle. There is bug 7694580, which is solved in 11.2. Simply stated, if the sequence cache size is 20, then you may increase the value to 1000. This is not only applicable for RAC, but for all large systems. So indeed it is allowed to increase the value (as user SYS):
    alter sequence sys.IDGEN1$ cache 1000;Herald ten Dam
    http://htendam.wordpress.com

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

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

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

  • Getting error while importing schema with ORACLE TEXT

    IMP-00003: ORACLE error 20000 encountered
    ORA-20000: Oracle Text error:
    DRG-52204: error while registering index
    DRG-10507: duplicate index name: WORKORDER_Q, owner: SYS
    ORA-06512: at "CTXSYS.DRUE", line 160
    ORA-06512: at "CTXSYS.DRIIMP", line 115
    ORA-06512: at line 2
    IMP-00088: Problem importing metadata for index WORKORDER_Q. Index creation will be skipped
    Database version - Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    Os version - Linux nlxs1012.slb.atosorigin-asp.com 2.6.18-308.el5 #1 SMP Fri Jan 27 17:17:51 EST 2012 x86_64 x86_64 x86_64 GNU/Linux
    We have take export of schema from production db now importing data to qa environment..
    In import facing above error..

    I am importing objects from P20_MAXIMO to Q25_MAXIMO to another database..
    Below is import par file..
    USERID='/ as sysdba'
    FILE=exp_P20_MAXIMO_C2364781.dmp
    LOG=imp_P20_MAXIMO__Q25_MAXIMO_C2364781_1.log
    FROMUSER=P20_MAXIMO
    TOUSER=Q25_MAXIMO
    buffer=1000000
    feedback=100000
    Export parfile
    userid='/ as sysdba'
    owner=P20_MAXIMO
    FILE=exp_P20_MAXIMO_C2364781.dmp
    LOG=exp_P20_MAXIMO_C2364781.log
    buffer=10000000
    feedback=100000
    statistics=none

  • Suggestion: Oracle text CONTEXT index on one or more columns ?

    Hi,
    I'm implementing Oracle text using CONTEXT ..... and would like to ask you for performance suggestion ...
    I have a table of Articles .... with columns .. TITLE, SUBTITLE , BODY ...
    Now is it better from performance point of view to move all three columns into one dummy column ... with name like FULLTEXT ... and put index on this single column,
    and then use CONTAINS(FULLTEXT,'...')>0
    Or is it almost the same for oracle if i put indexes on all three columns and then call:
    CONTAINS(TITLE,'...')>0 OR CONTAINS(SUBTITLE,'...')>0 OR CONTAINS(BODY,'...')>0
    I actually don't care if the result is a match in TITLE OR SUBTITLE OR BODY ....
    So if i move into some FULLTEXT column, then i have duplicate data in a article row ... but if i create indexes for each column, than oracle has 2x more to index,optimize and search ... am I wright ?
    Table has 1.8mil records ...
    Thank you.
    Kris

    mackrispi wrote:
    Now is it better from performance point of view to move all three columns into one dummy column ... with name like FULLTEXT ... and put index on this single column,
    and then use CONTAINS(FULLTEXT,'...')>0What version of Oracle are you on? If 11 then you could use a virtual column to do this, otherwise you'd have to write code to maintain the column which can get messy.
    mackrispi wrote:
    Or is it almost the same for oracle if i put indexes on all three columns and then call:
    CONTAINS(TITLE,'...')>0 OR CONTAINS(SUBTITLE,'...')>0 OR CONTAINS(BODY,'...')>0Benchmark it and find out :)
    Another option would be something like this.
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:9455353124561
    Were i you, i would try out those 3 approaches and see which meet your performance requirements and weigh that with the ease of implementation and administration.

Maybe you are looking for

  • 5800 v50 Sky mobile TV

    Since I upgraded the firmware to v50 I have been unable to receive mobile TV as I was before, keep on getting the message that I'm not in a 3G area even when I clearly am. Has anyone else had this problem or know of a solution to rectify?

  • Very urgent need to install 9.2.0.5 on IBM pSeries!!

    Hi All, This is very urgent requirement for me that I need to install 9.2.0.5 on IBM pSeries AIX V5.3 LPAR configured with HACMP.Is there any precution need to make before installation? and what is "LPAR configured with HACMP". I mean if you describe

  • Oraxsl

    I'm new to xml and am trying to figure out how this whole thing works. I'm on a windows xp client v10.2.0.4 connecting to a windows 64bit database. According to the universal installer i have the sdk installed. However, when i try and invoke oraxsl i

  • Partition not found while installing

    I have made a second partition with Boot Camp, I can see the HD icon named " BOOTCAMP" on my desktop. But when I want to install windows and I have to select the correct partition (Bootcamp), it isn't there. There's only one partition. Can som ebody

  • Why does iDVD crash every time

    I am using iDVD 7.1 (1145) on my iMac (OSX 10.6.5 / 8GB). I can start iDVD, create a new project and select a theme, but as soon as I click the media button in iDVD the program quits. Nothing else appears to be affected. The same version of iDVD runs