Obtain term vectors from CONTEXT index

I'm hoping to do Latent Semantic Indexing within the Oracle framework. There are many obstacles along the way, not least of which is obtaining the term-document matrix for the corpus. Being that we are using Oracle Text already for bread and butter search, I would like to be able to read the term vectors for each document based on that existing indexing. How can I go about doing this? I have an idea that there must be a way to read the $I table blob and derive the values without manually indexing yourself to obtain a transparent index. Is there a better way? Oracle docs recommend against reading the index tables and then seems to provide no means to obtain information regarding the index in a transparent fashion. I view this as a huge weakness of Oracle text over open source Lucene/Solr which to my understanding provides visibility into the term vectors. This seems an unnecessary and big oversight and would lead companies looking to do innovative text mining to other frameworks that don't have such glaring short comings.
I'm a bit frustrated and perhaps unfairly. Perhaps I just haven't found in the docs where this can be done. Any help is appreciated.

I was wanting a vector for a document that would contain the term frequency and the inverse document frequency for each term in the corpus. Internally, this is how Oracle handles search and ranking via the Salton algorithm but I believe they calculate the weights on the fly based on the inverted index containing term frequencies and inverse document frequency at the head of each posting list. So what this means for me, is that the representation would be too massive and sparse to be of any practical use. With that in mind I can use the CTX_DOC.TOKENS function to just obtain the tokens in a document, group the result table and count and put into my own simplified inverted index and go through all the documents in this manner.
So in summary, I think they don't provide that term vector because it is probably never actually materialized and is stored in an inverted manner instead and weights are calculated on the fly. The oracle text index is also concerned with so much more than what I need considering fuzzy string matching, wildcards etc. etc... So in the end it will take me a day or two to write code to build my own simplified index and do numerical algorithms on the spare matrix stored in such a manner.

Similar Messages

  • How to remove value from a vector (from its top index 0)

    HI Friends
    A basic question. In my code i am adding values in vector (v). Now i want to remove the values from the top of the vector (from index 0) and move them in an variable temp. How can i do it. I know there is a method remove in vector. but i am not sure how to use it.Can anybody show me how to do this?
    here is my peice of code
       public void result (){
            int temp1,temp2;
            for(int i=0; i<=  3000;i++){
               v.removeElement(i);
           }Thanks alot in advance

    Well, i'm Not sure what ur problem is...?!?
    Do U mean to say,
    You need to just remove the 0'th element from a Vector & store THAT in a element called temp..?!?
    Plz. have a look at the Vector class API in (for Java 1.4)
    http://java.sun.com/j2se/1.4.2/docs/api/
    There's a remove( ) which takes the index of the element to be removed...
    In ur case, u could say, for example
    Object temp = myVector.remove(0);or more appropriately,
    SomeType temp;
    temp = (SomeType)myVector.remove(0);--fritz                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Performance of context index with sorting

    Dear All,
    I've got a problem and don't know how to solve this.
    there has a table which have a XMLTYPE field to store the unstructred xml, and created with context index.
    When I try to select a record from it by using contains (res, '[searchingfield]')>0, the response time is quick, but when I try to order by another field which in the same table, the response time is drop down slightly. (ex. select id, path, res, update_date from testingtbl where contains(res, 'shopper')>0 order by update_date desc.
    Actually there is a context index build for field 'res', any other index build for field 'update_date', when sql without 'order by update_date', the context index will use, but the update_date index will not be used even have ordering criteria.
    Is there any expect can tell how to solve this? how to keep the performance even doing the sorting process?
    Thanks and Regards
    Raymond

    Thanks for your quick reply.
    The mentions information provide after back to office, actually I just want to know if there is any method(s) which can use the context index (with contains keyword) and sorting without slow down the performance.
    Thanks and Regards
    Raymond

  • Context index and contains operator syntax how it works ?

    Hi
    I create a context index on four collumns (text_prof, text_gest, text_citizen, text)
    of the same table content.
    When i have more than one collumn being queryed using the contains syntax, oracle display the ora 29907 error saying found duplicated labels in primary invocations .
    This query works:
    SELECT * FROM content WHERE cod_type = '1'
    AND (UPPER(title) LIKE UPPER('%tabagismo%')
    OR contains (text, 'tabagismo',1)>0
    This not works:
    SELECT * FROM content
    WHERE cod_type = '1' AND (
    UPPER(title) LIKE UPPER('%tabagismo%')
    OR contains (text, 'tabagismo',1)>0
    OR contains (text_citizen,'tabagismo',1)>0
    OR contains (text_gest,'tabagismo',1)>0
    OR contains (text_prof,'tabagismo',1)>0
    How can i fix it ?
    I need to query all these colluns !
    Does the contains operator can be used only in one collumn?
    Thank´s in advance

    Hi
    I create a context index on four collumns (text_prof, text_gest, text_citizen, text)
    of the same table content.
    When i have more than one collumn being queryed using the contains syntax, oracle display the ora 29907 error saying found duplicated labels in primary invocations .
    This query works:
    SELECT * FROM content WHERE cod_type = '1'
    AND (UPPER(title) LIKE UPPER('%tabagismo%')
    OR contains (text, 'tabagismo',1)>0
    This not works:
    SELECT * FROM content
    WHERE cod_type = '1' AND (
    UPPER(title) LIKE UPPER('%tabagismo%')
    OR contains (text, 'tabagismo',1)>0
    OR contains (text_citizen,'tabagismo',1)>0
    OR contains (text_gest,'tabagismo',1)>0
    OR contains (text_prof,'tabagismo',1)>0
    How can i fix it ?
    I need to query all these colluns !
    Does the contains operator can be used only in one collumn?
    Thank´s in advance

  • Context Index Peformance

    Hi,
    I want to create a context index on one column which contains large text. And the table contains millions of records and daily inserts happen into the same table. My question is
    1.Do we need to run any procedures after inserting the records daily i.e synchronization??
    2.Is there any problem from performace point of view creating context index on the table??
    Thanks,
    Sri

    hi,
    pls have a take a look this doc
    http://docs.oracle.com/cd/B19306_01/text.102/b14217/ind.htm
    http://stackoverflow.com/questions/1916244/how-to-sync-and-optimize-an-oracle-text-index
    regards,

  • Context Index and performance

    Hi,
    I want to create a context index on one column which contains large text. And the table contains millions of records and daily inserts happen into the same table. My question is
    1.Do we need to run any procedures after inserting the records daily?
    2.Is there any problem from performace point of view creating context index on the table
    Thanks,
    Sri

    sri333 wrote:
    Hi,
    I want to create a context index on one column which contains large text. And the table contains millions of records and daily inserts happen into the same table. My question is
    1.Do we need to run any procedures after inserting the records daily?Not for what you describe. But you didn't describe much. I guess you will do something with this table data later. It depends from that. But since you only mentioned that you insert. Then no there is nothing to do after that.
    2.Is there any problem from performace point of view creating context index on the tableSure. Creating the index takes time. If the index is there new inserts will take more time.
    Edited by: Sven W. on Oct 10, 2012 12:02 PM

  • Context index can't be used in complicated multiple tables join?

    hello
    thank you for view this page.
    i have a comlicated sql :
    SELECT count(*)
    from
    ((app_AssetBasicInfo left join app_AssetBasicInfoExt on
    app_AssetBasicInfo.id=app_AssetBasicInfoExt.id) left join
    (app_AssetCustominfo1 left join app_AssetCustominfoExt1 on
    app_AssetCustominfo1.id=app_AssetCustominfoExt1.id) on
    app_AssetBasicInfo.id=app_AssetCustominfo1.id) WHERE
    app_AssetBasicInfo.CategoryID=1 AND Del_tag=0 and contains(description,'department')>0;
    the table app_AssetBasicInfo and app_AssetBasicInfoExt have multiple columns and large recoord size. i create a context index on app_assetbasicinfoext(description) which description is 4000 varchar2.
    but the sql doesn't use context index. i suspect that the complicated multiple table join can't use context index? does it correct?
    thanks very much!

    Could you please post an explain plan? I'm not quite sure what is the issue.

  • Trying to understand context indexes and contains-help

    Hi
    i am using
    Achieving functionality of many preferences using one context index
    to understand context indexes and contains
    and i get the following
    Error starting at line 1 in command:
    begin
    ctx_ddl.create_preference ('nd_mcds', 'multi_column_datastore');
    ctx_ddl.set_attribute ('nd_mcds', 'columns', 'text nd, text text');
    ctx_ddl.create_section_group ('nd_sg', 'basic_section_group');
    ctx_ddl.add_ndata_section ('nd_sg', 'nd', 'nd');
    ctx_ddl.create_preference ('test_lex', 'basic_lexer');
    ctx_ddl.set_attribute ('test_lex', 'whitespace', '/\|-_+');
    end;
    Error report:
    ORA-06550: line 5, column 15:
    PLS-00302: component 'ADD_NDATA_SECTION' must be declared
    ORA-06550: line 5, column 7:
    PL/SQL: Statement ignored
    06550. 00000 - "line %s, column %s:\n%s"
    *Cause:    Usually a PL/SQL compilation error.
    *Action:
    so i am using the following to check for the error
    http://docs.oracle.com/cd/E18283_01/text.112/e16593/cddlpkg.htm#BABCBFCB
    plus
    oracle text application developer's guide
    plus
    oracle text reference
    but these have not listed that error (i have even googled this in vain)
    background::we were actually using catsearch but because of its downsides i want to implement this
    Is Achieving functionality of many preferences using one context index a good place to start when one does not know about
    context and contains??
    please post any other useful link for contains and context index that even explains
    1) fuzzy
    2) stem
    3) synonym
    4) near
    5) soundex
    6)ndata
    7)lexer
    thanks in advance

    Ndata is new to Oracle 11g. Your other posts indicate that you are using Oracle 10g, so you don't have ndata, so you get an error when you try to use it. If you want to use the 11g features that enable context indexes with contains to do all of the things that ctxcat indexes with catsearch do, then you need to upgrade to 11g.
    The online documentation is searchable. Most things regarding Oracle Text are contained in either the Oracle Text Reference or the Oracle Text Application Developer's guide.
    I suggest that you start with something very simple, then build from there.
    The following is similar to your other post that used catsearch:
    SCOTT@orcl_11gR2> CREATE TABLE mv_cat_seg_reg_prod
      2    (cat_ids       VARCHAR2 ( 7),
      3       act_status    VARCHAR2 (10),
      4       name           VARCHAR2 ( 1),
      5       email           VARCHAR2 ( 1),
      6       address1      VARCHAR2 ( 1),
      7       address2      VARCHAR2 ( 1),
      8       contact_name  VARCHAR2 ( 1),
      9       mobile           VARCHAR2 ( 1),
    10       telephone     VARCHAR2 ( 1))
    11  /
    Table created.
    SCOTT@orcl_11gR2> INSERT ALL
      2  INTO mv_cat_seg_reg_prod VALUES
      3    ('1', 'Y', 'A', 'B', 'C', 'D', 'E', 'F', 'G')
      4  INTO mv_cat_seg_reg_prod VALUES
      5    ('2', 'N', 'H', 'I', 'J', 'K', 'L', 'M', 'N')
      6  SELECT * FROM DUAL
      7  /
    2 rows created.
    SCOTT@orcl_11gR2> CREATE INDEX mv_cat_seg_reg_prod_idx
      2  ON mv_cat_seg_reg_prod (cat_ids)
      3  INDEXTYPE IS CTXSYS.CONTEXT
      4  /
    Index created.
    SCOTT@orcl_11gR2> SELECT token_text FROM dr$mv_cat_seg_reg_prod_idx$i
      2  /
    TOKEN_TEXT
    1
    2
    2 rows selected.
    SCOTT@orcl_11gR2> SELECT *
      2  FROM   (SELECT SCORE (1), name, email, address1, address2, contact_name, mobile, telephone
      3            FROM   mv_cat_seg_reg_prod
      4            WHERE  CONTAINS (cat_ids, '1', 1) > 0
      5            AND    act_status = 'Y'
      6            ORDER  BY DBMS_RANDOM.VALUE)
      7  WHERE  ROWNUM < 8
      8  /
      SCORE(1) N E A A C M T
             4 A B C D E F G
    1 row selected.

  • Is there a way to obtain a thumbnail from a video in Lightroom?

    Is there a way to obtain a thumbnail from a video in Lightroom? i.e. a small jpeg file.

    I just remembered that there is an undocumented module LrPhotoPictureView:
    http://forums.adobe.com/message/4140432#4140432
    In a quick test, it shows a thumbnail for .mov files in the catalog:
    Shows a 400 x 400 thumbnail for the selected file.
    local Require = require 'Require'.path ("../common")
    local Debug = require 'Debug'.init ()
    require 'strict'
    local LrApplication = import 'LrApplication'
    local LrDialogs = import 'LrDialogs'
    local LrFunctionContext = import 'LrFunctionContext'
    local LrPhotoPictureView = import 'LrPhotoPictureView'
    local LrView = import 'LrView'
    local showErrors = Debug.showErrors
    local function main (context)
        local f = LrView.osFactory()
        local catalog = LrApplication.activeCatalog ()
        local photo = catalog:getTargetPhoto ()
        if #photo == nil then
            LrDialogs.message ("No photo selected")
            return
            end
        local pictureView = LrPhotoPictureView.makePhotoPictureView ({
              width = 400, height = 400, photo = catalog:getTargetPhoto ()})
        local result = LrDialogs.presentModalDialog {
            title = "Thumbnail test", contents = f:column {
                f:static_text {title = photo:getFormattedMetadata ("fileName")},
                pictureView}}
        end
    LrFunctionContext.postAsyncTaskWithContext ("test",
        showErrors (function (context) main (context) end))

  • Privileges require for a user to create CONTEXT indexes

    Hi all,
       RDBMS: 11.2.0.3
       SO.......: OEL 6.3
       What are the necessary privileges that have to be granted to a user to be able to create CONTEXT Indexes, for example. I have granted the CTXAPP to my user, but when i tryied to create the CONTEXT Index with the command bellow, i got an "insufficient privilege" error message.
       CREATE INDEX USR_DOCS.IDX_CTX_TAB_DOCUMENTOS_01 ON USR_DOCS.TAB_DOCUMENTOS(DOCUMENTO) INDEXTYPE IS CTXSYS.CONTEXT PARAMETERS ('SYNC (ON COMMIT)');

    It depends on whether the user is trying to create the index on his own table in his own schema or on somebody else's table in somebody else's schema.  The following demonstrates minimal privileges (quota could be smaller) for user usr_docs to create the index on his own table in his own schema and for my_user to create the index on usr_docs table in usr_docs schema.
    SCOTT@orcl> -- version:
    SCOTT@orcl> SELECT banner FROM v$version
      2  /
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE    11.2.0.1.0    Production
    TNS for 64-bit Windows: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    5 rows selected.
    SCOTT@orcl> -- usr_docs privileges:
    SCOTT@orcl> CREATE USER usr_docs IDENTIFIED BY usr_docs
      2  /
    User created.
    SCOTT@orcl> ALTER USER usr_docs QUOTA UNLIMITED ON users
      2  /
    User altered.
    SCOTT@orcl> GRANT CREATE SESSION, CREATE TABLE TO usr_docs
      2  /
    Grant succeeded.
    SCOTT@orcl> -- my_user privileges:
    SCOTT@orcl> CREATE USER my_user IDENTIFIED BY my_user
      2  /
    User created.
    SCOTT@orcl> GRANT CREATE SESSION, CREATE ANY INDEX TO my_user
      2  /
    Grant succeeded.
    SCOTT@orcl> -- user_docs:
    SCOTT@orcl> CONNECT usr_docs/usr_docs
    Connected.
    USR_DOCS@orcl> CREATE TABLE tab_documentos (documento  CLOB)
      2  /
    Table created.
    USR_DOCS@orcl> INSERT ALL
      2  INTO tab_documentos VALUES ('test data')
      3  INTO tab_documentos VALUES ('other stuff')
      4  SELECT * FROM DUAL
      5  /
    2 rows created.
    USR_DOCS@orcl> CREATE INDEX USR_DOCS.IDX_CTX_TAB_DOCUMENTOS_01
      2  ON USR_DOCS.TAB_DOCUMENTOS(DOCUMENTO)
      3  INDEXTYPE IS CTXSYS.CONTEXT
      4  PARAMETERS ('SYNC (ON COMMIT)')
      5  /
    Index created.
    USR_DOCS@orcl> DROP INDEX usr_docs.idx_ctx_tab_documentos_01
      2  /
    Index dropped.
    USR_DOCS@orcl> -- my_user:
    USR_DOCS@orcl> CONNECT my_user/my_user
    Connected.
    MY_USER@orcl> CREATE INDEX USR_DOCS.IDX_CTX_TAB_DOCUMENTOS_01
      2  ON USR_DOCS.TAB_DOCUMENTOS(DOCUMENTO)
      3  INDEXTYPE IS CTXSYS.CONTEXT
      4  PARAMETERS ('SYNC (ON COMMIT)')
      5  /
    Index created.

  • Error when returning Vector from EJB Session Bean

    I am testing the EJB functionality within JDeveloper(9.0.3). I simply expanded on the tutorial that is in the documentation (departments and employees). I created a method in the stateless session bean that retrieves a Collection of employees for a department, then converts it to a Vector. When I try to return the Vector from the session bean to a sample client, I get an error indicating that the Object is NOT serializable. I know that Vector IS serializable. Why do I get this error? (The error displays on the client message log, NOT the OC4J message log). I tried dumping the Vector to System.out.println - this works fine, so I l know I'm getting data.
    Here is the stack trace and errors that display:
    com.evermind.server.rmi.OrionRemoteException: Error (de-)serializing object: EmployeeLocal_EntityBeanWrapper4
         java.lang.Object com.evermind.server.ejb.EJBUtils.cloneSerialize(java.lang.Object, com.evermind.server.ejb.AbstractEJBHome)
              EJBUtils.java:404
         java.lang.Object com.evermind.server.ejb.EJBUtils.cloneObject(java.lang.Object, com.evermind.server.ejb.AbstractEJBHome)
              EJBUtils.java:377
         java.lang.Object com.evermind.server.ejb.EJBUtils.cloneOneObjectInstance(java.lang.Object, com.evermind.server.ejb.AbstractEJBHome)
              EJBUtils.java:419
         java.lang.Object com.evermind.server.ejb.EJBUtils.cloneArrayList(java.util.ArrayList, com.evermind.server.ejb.AbstractEJBHome)
              EJBUtils.java:599
         java.lang.Object com.evermind.server.ejb.EJBUtils.cloneObject(java.lang.Object, com.evermind.server.ejb.AbstractEJBHome)
              EJBUtils.java:357
         java.util.Collection hrApp_StatelessSessionBeanWrapper2.getEmployeesByDepartment(java.lang.Long)
              hrApp_StatelessSessionBeanWrapper2.java:323
         java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[])
              native code
         void com.evermind.server.rmi.RMICallHandler.run(java.lang.Thread)
              RMICallHandler.java:119
         void com.evermind.server.rmi.RMICallHandler.run()
              RMICallHandler.java:48
         void EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run()
              PooledExecutor.java:803
         void java.lang.Thread.run()
              Thread.java:484
    at connection to localhost/127.0.0.1 as admin
         void com.evermind.server.rmi.RMIConnection.EXCEPTION_ORIGINATES_FROM_THE_REMOTE_SERVER(java.lang.Throwable)
              RMIConnection.java:1558
         java.lang.Object com.evermind.server.rmi.RMIConnection.invokeMethod(com.evermind.server.rmi.RMIContext, long, long, java.lang.reflect.Method, java.lang.Object[])
              RMIConnection.java:1511
         java.lang.Object com.evermind.server.rmi.RemoteInvocationHandler.invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object[])
              RemoteInvocationHandler.java:53
         java.lang.Object com.evermind.server.rmi.RecoverableRemoteInvocationHandler.invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object[])
              RecoverableRemoteInvocationHandler.java:22
         java.lang.Object com.evermind.server.ejb.StatelessSessionRemoteInvocationHandler.invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object[])
              StatelessSessionRemoteInvocationHandler.java:50
         java.util.Collection __Proxy1.getEmployeesByDepartment(java.lang.Long)
         javax.swing.table.DefaultTableModel hr.hrAppClientFrame.getTableModel()
              hrAppClientFrame.java:150
         void hr.hrAppClientFrame.jbInit()
              hrAppClientFrame.java:122
         void hr.hrAppClientFrame.<init>()
              hrAppClientFrame.java:58
         void hr.hrAppClientFrame.main(java.lang.String[])
              hrAppClientFrame.java:141
         Nested exception is:
    java.io.NotSerializableException: EmployeeLocal_EntityBeanWrapper4
         void java.io.ObjectOutputStream.outputObject(java.lang.Object)
              ObjectOutputStream.java:1148
         void java.io.ObjectOutputStream.writeObject(java.lang.Object)
              ObjectOutputStream.java:366
         java.lang.Object com.evermind.server.ejb.EJBUtils.cloneSerialize(java.lang.Object, com.evermind.server.ejb.AbstractEJBHome)
              EJBUtils.java:390
         java.lang.Object com.evermind.server.ejb.EJBUtils.cloneObject(java.lang.Object, com.evermind.server.ejb.AbstractEJBHome)
              EJBUtils.java:377
         java.lang.Object com.evermind.server.ejb.EJBUtils.cloneOneObjectInstance(java.lang.Object, com.evermind.server.ejb.AbstractEJBHome)
              EJBUtils.java:419
         java.lang.Object com.evermind.server.ejb.EJBUtils.cloneArrayList(java.util.ArrayList, com.evermind.server.ejb.AbstractEJBHome)
              EJBUtils.java:599
         java.lang.Object com.evermind.server.ejb.EJBUtils.cloneObject(java.lang.Object, com.evermind.server.ejb.AbstractEJBHome)
              EJBUtils.java:357
         java.util.Collection hrApp_StatelessSessionBeanWrapper2.getEmployeesByDepartment(java.lang.Long)
              hrApp_StatelessSessionBeanWrapper2.java:323
         java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[])
              native code
         void com.evermind.server.rmi.RMICallHandler.run(java.lang.Thread)
              RMICallHandler.java:119
         void com.evermind.server.rmi.RMICallHandler.run()
              RMICallHandler.java:48
         void EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run()
              PooledExecutor.java:803
         void java.lang.Thread.run()
              Thread.java:484
    at connection to localhost/127.0.0.1
         void com.evermind.server.rmi.OrionRemoteException.receive(java.net.InetAddress, java.lang.String)
              OrionRemoteException.java:130
         void com.evermind.server.rmi.RMIConnection.handleMethodInvocationResponse()
              RMIConnection.java:1673
         void com.evermind.server.rmi.RMIConnection.run(java.lang.Thread)
              RMIConnection.java:532
         void com.evermind.server.rmi.RMIConnection.run()
              RMIConnection.java:275
         void EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run()
              PooledExecutor.java:797
         void java.lang.Thread.run()
              Thread.java:484
    Any ideas?
    Thanks

    I would suggest opening a case with [email protected] FWIW, I recall seeing
              something like this in WLS 6.0. I believe it is fixed in WLS 6.1
              -- Rob
              Chris Dupuy wrote:
              > Btw, this occurs when I create an stateful session bean that ends up
              > throwing an exception and setRollbackOnly() is called. From that point
              > forward, my logs fill with this message.
              >
              > Chris
              >
              > "Chris Dupuy" <[email protected]> wrote in message
              > news:[email protected]..
              > > anyone know what this means, and what you can do about it?
              > >
              > >
              > > <Error> <ConnectionManager> <atossd03> <cbeyondServer> <ExecuteThread:
              > '14'
              > > for queue: 'd
              > > efault'> <> <> <000000> <Closing:
              > 'weblogic.rjvm.t3.T3JVMConnection@488831'
              > > because of: 'Server received a message over an uniniti
              > > alized connection: 'JVMMessage from: 'null' to:
              > >
              > '5825313123619479267S:10.6.6.40:[8000,8000,8001,8001,8000,8001,-1]:cbeyond:c
              > > beyond
              > > Server' cmd: 'CMD_REQUEST', QOS: '101', responseId: '2', invokableId: '1',
              > > flags: 'JVMIDs Not Sent, TX Context Not Sent', abbrev o
              > > ffset: '204'''>
              > >
              > >
              > >
              

  • Substring search with Oracle context indexes

    Hi,
    i would like to know if it is possibile to do a substring search with one of the obtion offer with the context indexes.
    (ctxcat,ctxrule,context)
    example:
    i would like to search the word 'berub' in a column A in table_example.
    the value in the column a are :
    The betther
    berube
    A.berube
    berub
    Berub
    BERUB
    R berube
    S tartif
    Y Thibeault
    the rows return should be :
    berube
    A.berube
    berub
    Berub
    BERUB
    R berube
    A simple sql could be
    select * from table_example where upper(a) like upper('%berub%' );
    How i can do this same action with the context indexes and a select (catsearch, contains, matches), if it is possible?
    A example will be welcome
    Thanks

    I know how to do explain plan.
    my point is not the query i post, it's just a example.
    I have many query on my production we optimize many times (they past from 3min to 15 sec with optimisation, but we want to have better result). At this point we are looking to implant the context indexes to make them more efficient.
    Do make this sql more efficient we have to deal with like '%xxxxxx%' and the context indexes like to be a option, but we have to be able to do some substring search with context option.
    Is it possible to do it and how?
    This is my question and why i post it here. The query is just a simple example to illsutrate what i want.
    Thanks to anyone who can answer my question.

  • About context index???

    Dear all,
    My oracle version is as follows;
    SQL> select * from v$version;
    BANNER
    Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
    PL/SQL Release 9.2.0.1.0 - Production
    CORE     9.2.0.1.0     Productio
    TNS for 32-bit Windows: Version 9.2.0.1.0 - Production
    NLSRTL Version 9.2.0.1.0 - Production
    I created ctxsys user as follows;
    conn sys as sysdba
    sql> @D:\oracle\ora92\ctx\admin\dr0dsys
    -- Run drcsys.sql with args USERNAME DEFAULT_TABLESPACE TEMPORARY_TABLESPACE
    sql> @D:\oracle\ora92\ctx\admin\dr0csys.sql ctxsys ctxsys temp
    connect ctxsys
    -- Run dr0inst.sql, with arg -  your CTX library (this one is for HP-UX)
    sql> @D:\oracle\ora92\ctx\admin\dr0inst
    -- Run drdefXX.sql to install language, XX = {us, uk, ...}
    sql> @D:\oracle\ora92\ctx\admin\defaults\drdefus.sql
    -- Grant users access to use CTX
    sql> grant CTXAPP to sun1;
    Now,I am creating context index on blob coulmn, but i got following error.
    conn sun1
    SQL> create index articles_title_idx on articles (title)
         indextype is ctxsys.context;
    create index articles_title_idx on articles (title)
    ERROR at line 1:
    ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
    ORA-20000: Oracle Text error:
    DRG-10502: index ARTICLES_TITLE_IDX does not exist
    DRG-50857: oracle error in drdmlpo
    ORA-00600: internal error code, arguments: [opibnd1], [], [], [], [], [], [],
    ORA-06512: at "CTXSYS.DRUE", line 157
    ORA-06512: at "CTXSYS.TEXTINDEXMETHODS", line 186
    Please help me.
    Thanks In advance,
    Prathamesh.

    ORA-600 is Oracle's message for unhandled exceptions in their code i.e. bugs. There is a bug for this behaviour. Does your system have the CURSOR_SHARING paremeter set to anything other than EXACT?
    Cheers, APC

  • CONTEXT INDEX TABLE에 대한 PARAMETER 설정하는 방법

    제품 : ORACLE SERVER
    작성날짜 : 2002-04-12
    CONTEXT INDEX TABLE에 대한 PARAMETER 설정하는 방법
    ==================================================
    Purpose
    Oracle7.3과 Oracle8.0의 context option에서 index table의
    storage parameter를 설정하는 방법을 알아보자.
    Explanation
    1. ConText Index Table과 Index
    Context option 에서는 text column에 대한 Context Index Table과
    그 테이블에 대한 Index를 생성한다. 이 table과 index는
    ctx_ddl.create_index procedure를 통해 자동으로 만들어지는 데,
    생성시에 이들 table과 index에 대한 tablespace, storage clause,
    pctfree등의 parameter에 대해 설정할 수가 없고 이런 정보를 가진
    preference 를 생성하여 policy를 생성할 때 지정해야 한다.
    Parameter를 지정할 수 있는 Context Index Table과 Index는 다음과 같다.
    Table Index
    DR_nnnnn_I1T DR_nnnnn_i1I
    DR_nnnnn_KTB DR_nnnnn_KIK
    DR_nnnnn_KID
    DR_nnnnn_LST DR_nnnnn_LIX
    DR_nnnnn_SQR DR_nnnnn_SRI
    위에서 nnnnn은 policy의 id이다. 이 번호는 다음과 같이 확인할 수 있다.
    select pol_id from ctx_user_policies where pol_name = 'DEMO_POLICY';
    처음 policy를 생성한 후 create index시 생성되는 Table과 Index는
    default로 해당 유저의 default tablespace에 생성된다. 그러나 default
    tablespace가 부족하거나 생성되는 table의 크기가 크면 initial, next등의
    parameter가 작아서 maxextent를 초과하는 문제가 발생하기도 한다.
    이런 경우 원하는 데이타를 올바로 찾지 못할 수도 있다. 이 때에는 storage
    parameter나 tablespace등을 따로 지정해 주어야 한다.
    2. Preference 생성
    Index table에 대한 parameter를 지정하려면 먼저 Generic Engine
    Tile의preference를 생성해야 한다. 이 generic engine tile에는
    다음과 같은 attribute를 지정할 수 있다.
    (1) Generic Engine Tile의 Attribute
    - index_memory
    - optimize_default
    - i1t_tablespace i1t_storage i1t_other_parms
    - i1I_tablespace i1I_storage i1I_other_parms
    - ktb_tablespace ktb_storage ktb_other_parms
    - kid_tablespace kid_storage kid_other_parms
    - kik_tablespace kik_storage kik_other_parms
    - lst_tablespace lst_storage lst_other_parms
    - lix_tablespace lix_storage lix_other_parms
    - sqr_tablespace sqr_storage sqr_other_parms
    - sri_tablespace sri_storage sri_other_parms
    xxx_tablespace는 각 table과 index의 tablespace를 지정하며 xxx_storage는
    storage절을, xxx_other_parms는 그 외의 다른 parameter를 지정할 수 있다.
    (2) 명령 형식
    CTX_DDL.SET_ATTRIBUTE
    ( name in varchar2, - 원하는 attribute이름
    value in varchar2 ); - 앞의 attribute에 해당하는 값
    CTX_DDL.CREATE_PREFERENCE
    ( preference_name in varchar2, - 임의의 preference이름
    description in varchar2, - comment
    object_name in varchar2 ); - 이 경우 GENERIC ENGINE
    Example
    [ 예제 1 ] 새로운 policy를 생성하는경우 parameter지정하기.
    begin
    ctx_ddl.set_attribute('I1T_TABLESPACE','USERS');
    ctx_ddl.set_attribute('I1T_STORAGE','INITIAL 10M NEXT 10M');
    ctx_ddl.set_attribute('I1T_OTHER_PARMS','PCTFREE 10');
    ctx_ddl.set_attribute('I1I_TABLESPACE','USERS');
    ctx_ddl.set_attribute('I1I_STORAGE','INITIAL 10M NEXT 10M');
    ctx_ddl.set_attribute('I1I_OTHER_PARMS','PCTFREE 10');
    ctx_ddl.create_preference('ART_ENGIN','Test Case','GENERIC ENGINE');
    ctx_ddl.create_policy('DEMO_POLICY',
    'ARTICLES.TEXT',
    lexer_pref=>'CTXSYS.KOREAN',
    engine_pref=>'ART_ENGIN');
    ctx_ddl.create_index('DEMO_POLICY');
    end;
    위의 예에서는 I1T table과 i1I index에 대한 parameter를 설정하였다.
    preference를 생성한 후 create_policy에서 engine_pref 에 생성한
    preference이름을 준다. 위의 예와 같이 실행한 후에 다음과 같이
    확인해 볼 수 있다.
    SQL> select table_name, tablespace_name from user_tables
    2 where table_name = 'DR_01104_I1T1';
    TABLE_NAME TABLESPACE_NAME
    DR_01104_I1T1 USERS
    ( dr_01104_i1t 는 synonym이며 dr_01104_i1t1이 base table이다. )
    SQL> select index_name, tablespace_name from user_indexes
    2 where table_name = 'DR_01104_I1T1';
    INDEX_NAME TABLESPACE_NAME
    DR_01104_I1I1 USERS
    [ 예제 2 ] 기존의 policy에 새로운 preference 적용하기
    이 방법은 기존에 존재하는 policy를 update하여 preference 를 적용하는
    방법이다. 이 경우 generic engine 은 update_policy를 하기 전에 index를
    drop해야 한다.
    begin
    ctx_ddl.set_attribute('I1T_TABLESPACE','USERS');
    ctx_ddl.set_attribute('I1T_STORAGE','INITIAL 10M NEXT 10M');
    ctx_ddl.set_attribute('I1T_OTHER_PARMS','PCTFREE 10');
    ctx_ddl.set_attribute('I1I_TABLESPACE','USERS');
    ctx_ddl.set_attribute('I1I_STORAGE','INITIAL 10M NEXT 10M');
    ctx_ddl.set_attribute('I1I_OTHER_PARMS','PCTFREE 10');
    ctx_ddl.create_preference('ART_ENGIN','Test Case','GENERIC ENGINE');
    ctx_ddl.drop_index('DEMO_POLICY');
    ctx_ddl.update_policy('DEMO_POLICY',
    engine_pref=>'ART_ENGIN');
    ctx_ddl.create_index('DEMO_POLICY');
    end;
    Reference Document
    Context User's Guide and Context Reference

  • Oracle 9.2 ConText index alternate_spelling problem

    Hello everybody!
    I'm having problems with a ConText index in Oracle 9.2, using the alternative_spelling parameter...
    Here is my code
    CREATE TABLE U2000P.TEST_FICHIER_INT
    (ID NUMBER(6) NOT NULL,
    NOM_FICHIER VARCHAR2(90) NULL,
    MIME VARCHAR2(90) NULL,
    FICHIER BLOB DEFAULT empty_blob(),
    LNG VARCHAR2(3) NULL,
    KEY_WORDS VARCHAR2(500) NULL,
    CONSTRAINT PK_TEST_FICHIER_INT PRIMARY KEY (ID)
    EXECUTE CTX_DDL.CREATE_PREFERENCE('ENGLISH_LEXER','BASIC_LEXER');
    EXECUTE CTX_DDL.SET_ATTRIBUTE('ENGLISH_LEXER', 'INDEX_THEMES', 'YES');
    EXECUTE CTX_DDL.SET_ATTRIBUTE('ENGLISH_LEXER', 'THEME_LANGUAGE', 'ENGLISH');
    EXECUTE CTX_DDL.SET_ATTRIBUTE('ENGLISH_LEXER', 'BASE_LETTER', 'NO');
    EXECUTE CTX_DDL.CREATE_PREFERENCE('FRENCH_LEXER','BASIC_LEXER');
    EXECUTE CTX_DDL.SET_ATTRIBUTE('FRENCH_LEXER', 'INDEX_THEMES', 'NO');
    EXECUTE CTX_DDL.SET_ATTRIBUTE('FRENCH_LEXER', 'BASE_LETTER', 'NO');
    EXECUTE CTX_DDL.CREATE_PREFERENCE('GERMAN_LEXER','BASIC_LEXER');
    EXECUTE CTX_DDL.SET_ATTRIBUTE('GERMAN_LEXER', 'INDEX_THEMES', 'NO');
    EXECUTE CTX_DDL.SET_ATTRIBUTE('GERMAN_LEXER', 'BASE_LETTER', 'NO');
    EXECUTE CTX_DDL.SET_ATTRIBUTE('GERMAN_LEXER', 'ALTERNATE_SPELLING', 'GERMAN');
    EXECUTE CTX_DDL.CREATE_PREFERENCE('GLOBAL_LEXER','MULTI_LEXER');
    EXECUTE CTX_DDL.ADD_SUB_LEXER('GLOBAL_LEXER', 'FRENCH', 'FRENCH_LEXER', '1');
    EXECUTE CTX_DDL.ADD_SUB_LEXER('GLOBAL_LEXER', 'DEFAULT', 'GERMAN_LEXER');
    EXECUTE CTX_DDL.ADD_SUB_LEXER('GLOBAL_LEXER', 'ENGLISH', 'ENGLISH_LEXER', '5');
    CREATE INDEX IDX_F_TEST_FICHIER_INT
    ON TEST_FICHIER_INT(FICHIER)
    INDEXTYPE IS CTXSYS.CONTEXT
    PARAMETERS('DATASTORE CTXSYS.DIRECT_DATASTORE
    FILTER CTXSYS.INSO_FILTER
    LEXER GLOBAL_LEXER LANGUAGE COLUMN LNG');
    In one of the files that I load, I have the word 'paläontologie'
    Here are my searches
    select nom_fichier, score(1) from test_fichier_int where contains(fichier, 'paläontologie', 1) > 0;
    -> no rows selected
    select nom_fichier, score(1) from test_fichier_int where contains(fichier, 'palaontologie', 1) > 0;
    -> Finds my document
    Why does the first search not work?
    If I don't use the 'alternate_spelling' parameter, both searches don't work, why is that???
    Thanks in advance for your help
    Best regards
    Neil.

    I found my error!!!! Thanks Neil... lol
    In fact, it's my SQL*Plus that must be badly configured, and I am having problems with accentuated characters... If I search through a browser, it works!!!
    Sorry about that...
    Best regards
    Neil.

Maybe you are looking for

  • Hi can i buy an apple developer account with gift cards?

    Hello i want to subscribe to the apple developer program but i dont have a credit card, and i have a few gift cards from my birthday, can i buy an apple developer account with those?

  • Has anyone found a solution to iphone not detecting wifi?

    I have read so many posts from people who's iphone's cannot find wifi networks but not found anyone who has solved the problem. Surely there must be a solution? I was in the Apple store last week and asked one of the staff had they seen this problem

  • ITunes Filing System

    I have noticed that iTunes on the backend database files albums and songs in a VERY strange fashion. It seems to put a ton of my songs into a folder called COMPLIATIONS or something like that. I have manually gone in and removed these albums from COM

  • CS4 better than CS3 for Leopard?

    Hi, I've been having some trouble with Adobe CS3 (especially Photoshop) on Apple OS X Leopard. Does anyone have experience with CS4 on this platform, and if so, is it better in terms of compatibility and/or memory management? Or is it just a bunch of

  • Horizontal image list in theme 20

    Hi, Does anyone know how to control the width of the horizontal image list in theme 20? Because the length of each text link below the image is different, some of the are longer than others, it causes some of the icon links to become wider than other