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

Similar Messages

  • 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.

  • On my ipod touch I'm not too sure how I uploaded a album onto my ipod from my laptop. But, now there is no way to delete the album full of pictures. What do I do? I only gotten it a while ago and not fully sure how to work it. Help?

    On my ipod touch I'm not too sure how I uploaded a album onto my ipod from my laptop. But, now there is no way to delete the album full of pictures. What do I do? I only gotten it a while ago and not fully sure how to work it. Help?

    http://support.apple.com/kb/HT4236

  • 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 indexing and PDFs

    I recently used application express to create an upload system to house word docs, Excel files and PDFs in a BLOB. I used a context index to index them and a CONTAINS query to search through the BLOB and have it find which documents contained certain words.
    My Problem is some PDFs are not indexing correctly, and I wondered what limitations there were to this and if we could fix them. Has anyone else encountered this?

    I am logged in as the user who owns the index.
    I set a filter "token_text = 'oracle' " when I am viewing the data in the DR$TEMP_INDEX$I table and I don't get anything returned(oracle is obviously listed in the 10g product guide, but it isn't in anything else). It returns other keywords in other documents.
    I am thinking it may be the embedded fonts issue? thets the only difference in the files I can see.
    Message was edited by:
    in3d

  • Context Indexes and ignoring characters

    So, we're trying to get a text index to ignore apostrophe's.
    insert into table values ('Arby''s');We want the above entry to be located with either of the following queries:
    select *
    from table
    where contains(field, 'Arbys')>0and also
    select *
    from table
    where contains(field, 'Arby''s')>0The second SQL works already, it's the former search that is finding no records. I tried adding an apostrophe to the STOPLIST, but it didn't seem to make a difference. Is there another tweak I can make, so that this works? Or am I going to need to create 2 columns, one without special characters which actually has the context index on it?
    Thanks,
    --=Chuck

    So this is what I've setup:
    SQL> begin
      2 
      3   
      4 
      5    CTX_DDL.CREATE_STOPLIST(stoplist_name => 'TEST_APOSTROPHE',
      6                            stoplist_type => 'BASIC_STOPLIST');
      7 
      8    CTX_DDL.ADD_STOPWORD(stoplist_name => 'TEST_APOSTROPHE',
      9                         stopword      => ''''); 
    10                    
    11 
    12  end;
    13  /
    PL/SQL procedure successfully completed.
    SQL> create table test_apos (name varchar2(100));
    Table created.
    SQL> CREATE INDEX TEST_APOS_NAME_CTX ON TEST_APOS
      2  (NAME)
      3  INDEXTYPE IS CTXSYS.CONTEXT
      4  PARAMETERS('STOPLIST TEST_APOSTROPHE SYNC(ON COMMIT)');
    Index created.
    SQL> insert into test_apos values ('Arby''s');
    1 row created.
    SQL> commit;
    Commit complete.The following usages of CONTAINS( ) will find the record, but, they either explicitly mention the apostrophe, or, they look for the string prior to the apostrophe. I expect all of these to work regardless of the STOPLIST entry:
    SQL> select * from test_apos where contains (name, 'Arby') > 0;
    NAME
    Arby's
    SQL>  select * from test_apos where contains (name, 'Arby%') > 0;
    NAME
    Arby's
    SQL> select * from test_apos where contains (name, 'Arby''s') > 0;
    NAME
    Arby's
    SQL> select * from test_apos where contains (name, '$(Arby)') > 0;
    NAME
    Arby'sNone of the following work (incl your suggestion, which I greatly appreciate, btw):
    SQL> select * from test_apos where contains (name, 'Arbys') > 0;
    no rows selected
    SQL> select * from test_apos where contains (name, 'Arby%s') > 0;
    no rows selected
    SQL> select * from test_apos where contains (name, 'Arbys%') > 0;
    no rows selected
    SQL> select * from test_apos where contains (name, '$(Arbys)') > 0;
    no rows selected--=cf

  • Just joined the photoshop + LL for photographers and I may misunderstand how this works.........

    I thought I would have the option to use Photoshop and Lightroom as an online version without downloading the product.  However, the first thing I was asked to do is to download the product.  Can someone clear this up for me.   Do I have to download the complete version of Photoshop and Lightroom to use the creative cloud subscription version of this product or Is it  a choice or do I simply download a small syncing app of some kind that links my computer to the online version.  Please answer this for me.  I already have a couple of software editors on my computer including Elements and others.  I really did not want to download another heavy software editing program.   So, let me know how this works.
    Thanks and Cheers.

    The "Creative Cloud" name has caused a lot of confusion for many people. You do have to download any of the Adobe apps as none of them have an online version.

  • Some websites open multiple pages from just one click.while just one of them is the main page,others are spam and contains virus..how do i stop it?

    these multiple pagres being spam sites slow down my pc and net connection probably through some infection.how do i control the opening of specified pages?

    Do a malware check with some malware scanning programs on the Windows computer.<br>
    Please scan with all programs because each program detects different malware.<br>
    All these programs have free versions.
    Make sure that you update each program to get the latest version of their databases before doing a scan.
    *Malwarebytes' Anti-Malware:<br>http://www.malwarebytes.org/mbam.php
    *AdwCleaner:<br>http://www.bleepingcomputer.com/download/adwcleaner/<br>http://www.softpedia.com/get/Antivirus/Removal-Tools/AdwCleaner.shtml
    *SuperAntispyware:<br>http://www.superantispyware.com/
    *Microsoft Safety Scanner:<br>http://www.microsoft.com/security/scanner/en-us/default.aspx
    *Windows Defender: Home Page:<br>http://www.microsoft.com/windows/products/winfamily/defender/default.mspx
    *Spybot Search & Destroy:<br>http://www.safer-networking.org/en/index.html
    *Kasperky Free Security Scan:<br>http://www.kaspersky.com/security-scan
    You can also do a check for a rootkit infection with TDSSKiller.
    *Anti-rootkit utility TDSSKiller:<br>http://support.kaspersky.com/5350?el=88446
    See also:
    *"Spyware on Windows": http://kb.mozillazine.org/Popups_not_blocked
    Can you send me your troubleshooting information from the Firefox installation that's having issues?
    *Navigate to <code>about:support</code> via Address Bar
    *Click the button that says <code>Copy text to clipboard</code>
    *Now, go back to your forum post and click inside the reply box. Press Ctrl+V to paste all the information you copied into the forum post.

  • Fireworks and dreamweaver issue. How they work seamlessly?

    Hi, I am new to these programs.
    I am trying to make a website using fireworks and
    dreamweaver. I've made my navigation area and headline in fireworks
    (simple navigation on left side and header on top). When I export
    this to dreamweaver, I am unable to make text etc in the blank area
    (main body content area) because as soon as I start typing,
    dreamweaver moves my navigation around because I think it is
    somehow linked to the main body area?
    I think I am missing a crucial step in this process.
    How do I use fireworks and dreamweaver seamlessly to allow me
    to edit body content of my pages, and not have it change anything
    on my navigation area?

    firebat99 wrote:
    >
    > I think I am missing a crucial step in this process.
    > How do I use fireworks and dreamweaver seamlessly to
    allow me to edit body
    > content of my pages, and not have it change anything on
    my navigation area?
    Here's a really good article on how to use Fireworks and
    Dreamweaver
    together.
    http://www.adobe.com/devnet/fireworks/articles/layout_editing.html
    Linda Rathgeber ACE ::: PVII
    http://www.projectseven.com
    Fireworks Newsgroup:
    news://forums.projectseven.com/fireworks/
    CSS Newsgroup: news://forums.projectseven.com/css/
    Adobe Community Expert - Fireworks
    Design Aid Kits:
    http://www.webdevbiz.com/pwf/index.cfm

  • I need to transfer information through firewire cable and could not remember how it works, please, help

    Please help, I need urgently to transfer information through firewire cable and I could not remember how it was that I do it. I've connected the computers and restarted one of them by pushing T on startup but it did not work.

    Shut down both Macs.  Connect them via FW cable.
    On the Mac you want to copy FROM.  Start up but make sure you are holding down the T key as soon as you press the power button.  And keep holding down the T key until the FireWire emblem appears on the screen - that's the indicator that the Mac is in Target Disk Mode (TDM).  Note: if you release the T key too soon the Mac won't go into Target Disk Mode.
    Start up the second Mac.  The first Mac will appear in the Finder as a disk.  You can use the Finder to copy whatever you want from the Mac that's in TDM.
    When you're done, shut down both Macs.  The Mac that's in Target Disk Mode can be shut down by holding down the power button until it turns off.

  • I just got my iphone yesterday and have no idea how to work it since it doesn't come with an owners manuel. I was wondering if there were any way of saving the audio attachments from multimedia messages or text messages as ring tones??

    Is there any way to save audio attachments from multimedia messages or text messages as ringtones so I can set them to specific contacts on the iphone 3gs??

    You have to create iphone ringtones.
    There are many free ways to do this.  Google will find them.
    Click Support and the top of this page, then Manuals, then iphone user guide to find the manual, or look at your bookmarks on the iphone.

  • 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

  • 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.

  • Optimizing context index

    I have created a context index and want to optimize it regularly. I issue the following statement:
    ctx_ddl.optimize_index('MY_INDEX','FAST');
    In the Enterprise Manager I can see, that there are a lot of Sort/Merge-operations, but the optimize process doesn't finish.
    (During optimize there are inserts into the table and the index is updated by the ctx_ddl.sync_index procedure).
    Can anyone tell me why the optimize doesn't finish? How can I avoid this situation?

    How long did you leave it running?Optimizing ran more than 10 hours. So I cancelled it, because this is not acceptable.
    Optimization is an intensive process, and can sometimes take longer than the original index creation.
    If you want it to complete in less time, consider using FULL optimize, but setting a time limit on it. That way it will do as much as it can within the time limit, and then start again next time from where it finished last time.During the night, I start a FULL optimize with MAXTIME = 60 minutes. But this seems not to be enough. If I don't start FAST optimizing during the day, the index get to much fragmentated.
    Alternatively, if optimization is taking a lot longer than creating the index, consider dropping the index and recreating it from scratch. This will require downtime on the system, unless you get clever and use the USER_DATASTORE to create two indexes on different, dummy, columns - and switch searching between them when you want to rebuild the index. Make sure you use a generous setting for INDEX_MEMORY to avoid fragmentation.
    - Roger

  • Question about CO and CA operator

    Hi,
    I have a field for which I want to detect a case where if it is null or contains any alphabhet from a to z.
    For this I have defined a constant:
      CONSTANTS: c_valid(26) TYPE c VALUE
      'ABCDEFGHIJKLMNOPQRSTUVWXYZ'.
    But I get confused in using CO and CA operator. How can I achieve above logic.
    Thanks,
    CD

    You want to use CA(Contains Any) because you want to know if there are ANY alpha characters here,  Contains Only would be if you wanted to test that it Only contains values other than alphas, in your case.
    if lv_value is initial
        or lv_value CA sy-abcde.
    endif.
    Regards,
    Rich Heilman

Maybe you are looking for