Progressive relaxation doesn't execute all sequeces

I' trying to execute the following query:
select * from UNIMI_GA.ENTITA_RC entitarc0_ where CONTAINS(entitarc0_.VALORE_INDICIZZATO, '
<query><textquery lang="ITALIAN" grammar="CONTEXT">
<progression>
<seq>$esame NEAR $microbiologiche</seq>
<seq>$esame AND $microbiologiche</seq>
<seq>$esame ACCUM $microbiologiche</seq>
<seq>?esame ACCUM ?microbiologiche</seq>
</progression>
</textquery><score datatype="INTEGER" algorithm="DEFAULT"/></query>
', 1)>0
Scenario 1
There is no field VALORE_INDICIZZATO that contains both "esame" NEAR/AND "microbiologiche" (in exact/stemmed versions).
But there are loads of records with that field containing "esame" or "microbiologiche".
I would expect those records to be returned from this query. But this not happens. The only way I found to obtain what I want is deleting the first 2 seq nodes in the xml (those containing NEAR and AND operators).
Scenario 2
If I add a new record with both "esame" and "microbiologiche" in VALORE_INDICIZZATO and execute the query again, the query returns the last inserted record and all the records that contains "esame" or "microbiologiche".
Is this behavioiur correct?
Thanks
Davide

I believe bug 5060137 was introduced in 10.2.0.1 and fixed in the 10.2.0.3 patch set. I don't have access to Metalink, so I can't tell you exactly where to find the patch set, just that others have found it and used it to fix the problem. I imagine someone on Metalink can help you locate it.

Similar Messages

  • Progressive relaxation doesn't progress

    I just discovered that in a contains() query with a <progression> tag and multiple <seq> conditions, the query does not return any results (ie, does not evaluate any subsequent conditions) if the first condition fails (ie, returns no rows).
    Is this the correct behavior? It seems like a bug to me. I dont see it mentioned in the documentation anywhere.
    Thanks,
    Rory

    If you use a ctxcat index and catsearch, instead of a context index and contains, the optimizer uses the domain index and returns the correct results quickly, as shown in the comparison below. The only bad thing about catsearch is that, as far as I know, the score function doesn't work with it.
    SCOTT@10gXE> CREATE TABLE presidents
      2    (id   NUMBER,
      3       name VARCHAR2(60))
      4  /
    Table created.
    SCOTT@10gXE> INSERT INTO presidents VALUES (1, 'William Jefferson Clinton')
      2  /
    1 row created.
    SCOTT@10gXE> BEGIN
      2    FOR i IN 1 .. 40 LOOP
      3        INSERT INTO presidents
      4        SELECT object_id, object_name
      5        FROM     all_objects;
      6    END LOOP;
      7  END;
      8  /
    PL/SQL procedure successfully completed.
    SCOTT@10gXE> SELECT COUNT(*) FROM presidents
      2  /
      COUNT(*)
        481081
    SCOTT@10gXE> CREATE INDEX presidents_idx
      2  ON presidents (name)
      3  INDEXTYPE IS CTXSYS.CONTEXT
      4  /
    Index created.
    SCOTT@10gXE> EXEC DBMS_STATS.GATHER_TABLE_STATS ('SCOTT', 'PRESIDENTS')
    PL/SQL procedure successfully completed.
    SCOTT@10gXE> SET TIMING ON
    SCOTT@10gXE> SET AUTOTRACE ON EXPLAIN
    SCOTT@10gXE> select id, name
      2  from   presidents
      3  where  contains(name,
      4                  '<query>
      5                  <textquery>
      6                    <progression>
      7                      <seq>{William} {Clinton}</seq>
      8                      <seq>{William} ; {Clinton}</seq>
      9                    </progression>
    10                  </textquery>
    11                   </query>',1) <> 0
    12  /
            ID NAME
             1 William Jefferson Clinton
    Elapsed: 00:01:35.74
    Execution Plan
    Plan hash value: 3740813417
    | Id  | Operation         | Name       | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT  |            | 23933 |   514K|   746  (35)| 00:00:09 |
    |*  1 |  TABLE ACCESS FULL| PRESIDENTS | 23933 |   514K|   746  (35)| 00:00:09 |
    Predicate Information (identified by operation id):
       1 - filter("CTXSYS"."CONTAINS"("NAME",'<query>
                  <textquery>                       <progression>
                  <seq>{William} {Clinton}</seq>                         <seq>{William} ;
                  {Clinton}</seq>                       </progression>
                   </textquery>                   </query>',1)<>0)
    SCOTT@10gXE> SET TIMING OFF
    SCOTT@10gXE> SET AUTOTRACE OFF
    SCOTT@10gXE> DROP INDEX presidents_idx
      2  /
    Index dropped.
    SCOTT@10gXE> CREATE INDEX presidents_idx
      2  ON presidents (name)
      3  INDEXTYPE IS CTXSYS.CTXCAT
      4  /
    Index created.
    SCOTT@10gXE> EXEC DBMS_STATS.GATHER_TABLE_STATS ('SCOTT', 'PRESIDENTS')
    PL/SQL procedure successfully completed.
    SCOTT@10gXE> SET TIMING ON
    SCOTT@10gXE> SET AUTOTRACE ON EXPLAIN
    SCOTT@10gXE> select id, name
      2  from   presidents
      3  where  catsearch(name,
      4                  '<query>
      5                  <textquery>
      6                    <progression>
      7                      <seq>{William} {Clinton}</seq>
      8                      <seq>{William} ; {Clinton}</seq>
      9                    </progression>
    10                  </textquery>
    11                   </query>',null) > 0
    12  /
            ID NAME
             1 William Jefferson Clinton
    Elapsed: 00:00:01.94
    Execution Plan
    Plan hash value: 777849224
    | Id  | Operation                   | Name           | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT            |                | 24160 |   519K|   486   (1)| 00:00:06 |
    |   1 |  TABLE ACCESS BY INDEX ROWID| PRESIDENTS     | 24160 |   519K|   486   (1)| 00:00:06 |
    |*  2 |   DOMAIN INDEX              | PRESIDENTS_IDX |       |       |            |          |
    Predicate Information (identified by operation id):
       2 - access("CTXSYS"."CATSEARCH"("NAME",'<query>                     <textquery>
                                     <progression>                         <seq>{William}
                  {Clinton}</seq>                         <seq>{William} ; {Clinton}</seq>
                           </progression>                     </textquery>
                  </query>',NULL)>0)
    SCOTT@10gXE>

  • Query using progressive relaxation take more time for execution

    HI Gurus,
    I am creating a query using context index and progressive relaxation
    I had started using progressive relaxation after getting inputs from forum {thread:id=2333942} . Using progressive relaxation takes more than 7 seconds for every query. Is there any way we can improve the performance of the query?
    create table test_sh4 (text1 clob,text2 clob,text3 clob);
    begin
       ctx_ddl.create_preference ('nd_mcd', 'multi_column_datastore');
       ctx_ddl.set_attribute
          ('nd_mcd',
           'columns',
           'replace (text1, '' '', '''') nd1,
            text1 text1,
            replace (text2, '' '', '''') nd2,
            text2 text2');
       ctx_ddl.create_preference ('test_lex1', 'basic_lexer');
       ctx_ddl.set_attribute ('test_lex1', 'whitespace', '/\|-_+');
       ctx_ddl.create_section_group ('test_sg', 'basic_section_group');
       ctx_ddl.add_field_section ('test_sg', 'text1', 'text1', true);
       ctx_ddl.add_field_section ('test_sg', 'nd1', 'nd1', true);
       ctx_ddl.add_field_section ('test_sg', 'text2', 'text2', true);
       ctx_ddl.add_field_section ('test_sg', 'nd2', 'nd2', true);
    end;
    create index IX_test_sh4 on test_sh4 (text3)   indextype is ctxsys.context   parameters    ('datastore     nd_mcd   lexer test_lex1 section group     test_sg') ;
    alter index IX_test_sh4 REBUILD PARAMETERS ('REPLACE SYNC (ON COMMIT)') ;-- sync index on every commit.
    SELECT SCORE(1) score,t.* FROM test_sh4 t WHERE CONTAINS (text3,  '
    <query>
    <textquery>
    <progression>
    <seq>{GIFT GRILL STAPLES CARD} within text1</seq>
    <seq>{GIFTGRILLSTAPLESCARD} within nd1</seq>
    <seq>{GIFT GRILL STAPLES CARD} within text2</seq>
    <seq>{GIFTGRILLSTAPLESCARD} within nd2</seq>
    <seq>((%GIFT% and %GRILL% and %STAPLES% and %CARD%)) within text1</seq>
    <seq>((%GIFT% and %GRILL% and %STAPLES% and %CARD%)) within text2</seq>
    <seq>((%GIFT% and %GRILL% and %STAPLES%) or (%GRILL% and %STAPLES% and %CARD%) or (%GIFT% and %STAPLES% and %CARD%) or (%GIFT% and %GRILL% and %CARD%)) within text1</seq>
    <seq>((%GIFT% and %GRILL% and %STAPLES%) or (%GRILL% and %STAPLES% and %CARD%) or (%GIFT% and %STAPLES% and %CARD%) or (%GIFT% and %GRILL% and %CARD%)) within text2</seq>
    <seq>((%STAPLES% and %CARD%) or (%GIFT% and %GRILL%) or (%GRILL% and %CARD%) or (%GIFT% and %CARD%) or (%GIFT% and %STAPLES%) or (%GRILL% and %STAPLES%)) within text1</seq>
    <seq>((%STAPLES% and %CARD%) or (%GIFT% and %GRILL%) or (%GRILL% and %CARD%) or (%GIFT% and %CARD%) or (%GIFT% and %STAPLES%) or (%GRILL% and %STAPLES%)) within text2</seq>
    <seq>((%GIFT% , %GRILL% , %STAPLES% , %CARD%)) within text1</seq>
    <seq>((%GIFT% , %GRILL% , %STAPLES% , %CARD%)) within text2</seq>
    <seq>((!GIFT and !GRILL and !STAPLES and !CARD)) within text1</seq>
    <seq>((!GIFT and !GRILL and !STAPLES and !CARD)) within text2</seq>
    <seq>((!GIFT and !GRILL and !STAPLES) or (!GRILL and !STAPLES and !CARD) or (!GIFT and !STAPLES and !CARD) or (!GIFT and !GRILL and !CARD)) within text1</seq>
    <seq>((!GIFT and !GRILL and !STAPLES) or (!GRILL and !STAPLES and !CARD) or (!GIFT and !STAPLES and !CARD) or (!GIFT and !GRILL and !CARD)) within text2</seq>
    <seq>((!STAPLES and !CARD) or (!GIFT and !GRILL) or (!GRILL and !CARD) or (!GIFT and !CARD) or (!GIFT and !STAPLES) or (!GRILL and !STAPLES)) within text1</seq>
    <seq>((!STAPLES and !CARD) or (!GIFT and !GRILL) or (!GRILL and !CARD) or (!GIFT and !CARD) or (!GIFT and !STAPLES) or (!GRILL and !STAPLES)) within text2</seq>
    <seq>((!GIFT , !GRILL , !STAPLES , !CARD)) within text1</seq>
    <seq>((!GIFT , !GRILL , !STAPLES , !CARD)) within text2</seq>
    <seq>((?GIFT and ?GRILL and ?STAPLES and ?CARD)) within text1</seq>
    <seq>((?GIFT and ?GRILL and ?STAPLES and ?CARD)) within text2</seq>
    <seq>((?GIFT and ?GRILL and ?STAPLES) or (?GRILL and ?STAPLES and ?CARD) or (?GIFT and ?STAPLES and ?CARD) or (?GIFT and ?GRILL and ?CARD)) within text1</seq>
    <seq>((?GIFT and ?GRILL and ?STAPLES) or (?GRILL and ?STAPLES and ?CARD) or (?GIFT and ?STAPLES and ?CARD) or (?GIFT and ?GRILL and ?CARD)) within text2</seq>
    <seq>((?STAPLES and ?CARD) or (?GIFT and ?GRILL) or (?GRILL and ?CARD) or (?GIFT and ?CARD) or (?GIFT and ?STAPLES) or (?GRILL and ?STAPLES)) within text1</seq>
    <seq>((?STAPLES and ?CARD) or (?GIFT and ?GRILL) or (?GRILL and ?CARD) or (?GIFT and ?CARD) or (?GIFT and ?STAPLES) or (?GRILL and ?STAPLES)) within text2</seq>
    <seq>((?GIFT , ?GRILL , ?STAPLES , ?CARD)) within text1</seq>
    <seq>((?GIFT , ?GRILL , ?STAPLES , ?CARD)) within text2</seq>
    </progression>
    </textquery>
    <score datatype="FLOAT" algorithm="default"/>
    </query>',1) >0 ORDER BY score(1) DESC

    Progressive relaxation works best when you're only selecting a limited number of rows. If you fetch ALL the rows which satisfy the query, then all the steps in the relaxation will have to run regardless.
    If you fetch - say - the first 10 results, then if the first step of the relaxation provides 10 results then there is no need to execute the next step (in fact, due to internal buffering, that won't be exactly true but it's conceptually correct).
    The simplest way to do this is reword the query as
    SELECT * FROM (
    ( SELECT SCORE(1) score,t.* FROM test_sh4 t WHERE CONTAINS (text3, '
    <query>
    <textquery>
    </textquery>
    <score datatype="FLOAT" algorithm="default"/>
    </query>',1) >0 ORDER BY score(1) DESC
    WHERE ROWNUM <= 10
    You've discovered that leading wild cards don't work too well unless you use SUBSTRING_INDEX. I would encourage you to avoid them altogether if possible, or push them down much lower in the progressive relaxation. Usually, GIFT% is a useful expression (matches GIFTS, GIFTED, etc), %GIFT% is generally no more effective.
    There are a lot of steps in your progressive relaxation. It you wanted to reduce the number of steps, you could change:
    <seq>((%GIFT% and %GRILL% and %STAPLES% and %CARD%)) within text1</seq>
    <seq>((%GIFT% and %GRILL% and %STAPLES% and %CARD%)) within text2</seq>
    to
    <seq>((%GIFT% and %GRILL% and %STAPLES% and %CARD%)*2) within text1 ACCUM ((%GIFT% and %GRILL% and %STAPLES% and %CARD%)) within text2</seq>
    I don't know if this would have any performance benefits - but it's worth trying it to see.

  • Progressive Relaxation with error

    Hi,
    I tried to use progress relaxation to calculate matching scores(between t1.album and t2.title) and store them into a table. However, after executing the following script, I got these errors:
    ERROR at line 1:
    ORA-29902: error in executing ODCIIndexStart() routine
    ORA-20000: Oracle Text error:
    DRG-50901: text query parser syntax error on line 1, column 34
    ORA-06512: at line 26
    And the outer cursor stopped at some point. I've been working on it for many days already, but I still can't figure it out...
    Oh, one more question: what is 'c' in the statement 'for c in (......)'? I got this from http://www.oracle.com/technology/products/text/htdocs/prog_relax.html, but I don't understand what it does...
    Thanks a lot!!!!!!
    Here is the script:
    DECLARE
    max_rows integer := 300000;
    counter integer := 0;
    current_album t1.album%TYPE;
    CURSOR album_cursor IS
         SELECT distinct album FROM t1;
    BEGIN
    OPEN album_cursor;
    LOOP
    FETCH album_cursor INTO current_album;
    EXIT WHEN album_cursor%NOTFOUND;
    for c in (select score(1) scr, aritst, Title from t2 where contains (Title, '
    <query>
    <textquery>'||'{'||current_album||'}'||'
    <progression>
    <seq><rewrite>transform((TOKENS, "{", "}", " "))</rewrite></seq>
    <seq><rewrite>transform((TOKENS, "?{", "}", " "))</rewrite>/seq>
    <seq><rewrite>transform((TOKENS, "{", "}", "OR"))</rewrite></seq>
    <seq><rewrite>transform((TOKENS, "?{", "}", "OR"))</rewrite></seq>
    </progression>
    </textquery>
    </query>
    ', 1) > 0)
    LOOP
    counter := counter + 1;
    INSERT INTO ALBUM_MATCHED(SEQNUM, SCORE, ARTIST, t2_TITLE, t1_ALBUM)
    VALUES(counter, c.scr, c.artist, c.Title, current_album);
    commit;
    EXIT when counter >= max_rows;
    END LOOP;
    END LOOP;
    CLOSE album_cursor;
    END;
    **************************************************************************************************************************************************

    Hi raford,
    I also suspect that it's a problem caused by special characters. That's why I defined the following skipjoins for the matching column indexes:
    exec CTX_DDL.CREATE_PREFERENCE ('spe_cha_lexer', 'BASIC_LEXER');
    exec CTX_DDL.SET_ATTRIBUTE('spe_cha_lexer', 'SKIPJOINS' , '\,\&\=\{\}\\\(\)\[\]\-\;\~\|\$\!\>\*\%\_''\<\:\?\.\+\/\"@#');
    create index t1_album_idx on t1 (album)
    indextype is ctxsys.context
    parameters ('lexer spe_cha_lexer wordlist wildcard_pref sync (on commit)');
    create index t2_title_idx on amazonData (title)
    indextype is ctxsys.context
    parameters ('lexer spe_cha_lexer wordlist wildcard_pref sync (on commit)');
    Here is the table structures of t1 and t2, and resultset table album_matched:
    create table t1(album varchar2(500));
    create table t2(artist varchar2(500), title varchar2(4000));
    create table album_matched(SEQNUM number, SCORE number, ARTIST varchar2(500), t2_TITLE varchar2(4000), t1_ALBUM varchar2(500));
    Here is some sample data:
    for t1:
    Madeline Porter
    Harry Porter
    ???? R & H ?????
    mandy's candy
    for t2.artist, you can put whatever. and for t2.title:
    Harry Porter
    Basically, you can put everything in t1.album and t2.artist and t2.title, since we downloaded these data from a website. Therefore, there might be a lot of special characters in it, some of which might be miscoded into english from French or some other languages.
    And I found the scoring is not right too...both table contain 'Harry Porter', but the matching score has only 68...don't know why...
    Thanks a lot!

  • Progressive  relaxation

    I need to progressively relax my query, however, what I want is as follows:
    If someone searched for say "Acrylic Crochet Throws" then
    - the results with exact match should come on top
    - followed by the match with stemming but all three words next to each other
    - then a near search with max span of 15
    - after this I want to repeat the above three conditions with combination of any two words i.e. "Acrylic Crochet", "Acrylic Throws" and "Crochet Throws"
    Similarly if the searched string as 4 words, then it should first search for all 4 words, then combination of 3 words, then combination of two words.
    Can someone guid me on how to achieve this
    Madhup

    In the example below, I have written a user-defined function to return the sequences for the progressive query relaxation. I wrote it to handle groups of up to four words. If you want more, just add more nested loops to the function. I included examples of what the function returns. I demonstated a query with a context index and contains, so that you can see that it works by the scores. However, I recommend that you use a ctxcat index and catsearch, as in the last query. There is a bug with context and contains not returning any rows if the first criteria of progressive query relaxation is not met and the optimizer uses the domain index.
    SCOTT@10gXE> -- table and data:
    SCOTT@10gXE> CREATE TABLE test_tab
      2    (test_col VARCHAR2 (50))
      3  /
    Table created.
    SCOTT@10gXE> INSERT ALL
      2  INTO test_tab VALUES ('acrylic crochet throws')
      3  INTO test_tab VALUES ('acrylic crochets throwing')
      4  INTO test_tab VALUES ('acrylic word2 crochet word4 throws')
      5  INTO test_tab VALUES ('acrylic crochet')
      6  INTO test_tab VALUES ('acrylic throws')
      7  INTO test_tab VALUES ('crochet throws')
      8  INTO test_tab VALUES ('acrylics crocheting')
      9  INTO test_tab VALUES ('acrylics throwing')
    10  INTO test_tab VALUES ('crocheting throw')
    11  INTO test_tab VALUES ('acrylic word2 crochet')
    12  INTO test_tab VALUES ('acrylic word2 throws')
    13  INTO test_tab VALUES ('crochet word2 throws')
    14  sELECT * FROM DUAL
    15  /
    12 rows created.
    SCOTT@10gXE> -- function:
    SCOTT@10gXE> CREATE OR REPLACE FUNCTION seqs
      2    (p_words        IN VARCHAR2)
      3    RETURN            VARCHAR2
      4  AS
      5    v_words            VARCHAR2 (32767) := LTRIM (RTRIM (p_words));
      6    v_result        VARCHAR2 (32767);
      7    v_spaces        INTEGER;
      8    v_string        VARCHAR2 (32767);
      9    TYPE t_varchar2 IS TABLE OF VARCHAR2(255) INDEX BY BINARY_INTEGER;
    10    t_words            t_varchar2;
    11  BEGIN
    12    WHILE INSTR (v_words, '     ') > 0 LOOP
    13        v_words := REPLACE (v_words, '  ', ' ');
    14    END LOOP;
    15    v_result := v_result || CHR(10) || '<seq>' || v_words || '</seq>';
    16    v_result := v_result || CHR(10) || '<seq>$' || REPLACE (v_words, ' ', ' $') || '</seq>';
    17    v_result := v_result || CHR(10) || '<seq>NEAR((' || REPLACE (v_words, ' ', ', ') || '), 15, TRUE)</seq>';
    18    v_spaces := LENGTH (v_words) - LENGTH (REPLACE (v_words, ' ', ''));
    19    IF v_spaces > 1 THEN
    20        v_string := v_words || ' ';
    21        FOR i IN 1 .. v_spaces + 1 LOOP
    22          t_words (i) := SUBSTR (v_string, 1, INSTR (v_string, ' ') - 1);
    23          v_string := SUBSTR (v_string, INSTR (v_string, ' ') + 1);
    24        END LOOP;
    25        FOR n IN REVERSE 1 .. v_spaces - 1 LOOP
    26          FOR x IN 1 .. 3 LOOP
    27            v_result := v_result || CHR(10) || '<seq>';
    28            v_string := '';
    29 
    30            FOR i IN 0 + 1 .. GREATEST (LEAST (v_spaces + 1 - n, v_spaces + 1), 0+1)
    31            LOOP
    32              IF n >= 1 THEN
    33             FOR j IN i + 1 .. GREATEST (LEAST (v_spaces + 2 - n, v_spaces + 1), i+1)
    34             LOOP
    35               IF n >= 2 THEN
    36                 FOR k IN j + 1 .. GREATEST (LEAST (v_spaces + 3 - n, v_spaces + 1), j+1)
    37                 LOOP
    38                   IF n >= 3 THEN
    39                  FOR l IN k + 1 .. GREATEST (LEAST (v_spaces + 4 - n, v_spaces + 1), k+1)
    40                  LOOP
    41                    v_string := v_string || t_words(i) || ' ' || t_words(j) || ' ' || t_words(k) || ' ' || t_words(l);
    42                    v_string := v_string || CHR(10) || 'OR ';
    43                  END LOOP;
    44                   ELSE
    45                  v_string := v_string || t_words(i) || ' ' || t_words(j) || ' ' || t_words(k);
    46                  v_string := v_string || CHR(10) || 'OR ';
    47                   END IF;
    48                 END LOOP;
    49               ELSE
    50                 v_string := v_string || t_words(i) || ' ' || t_words(j);
    51                 v_string := v_string || CHR(10) || 'OR ';
    52               END IF;
    53             END LOOP;
    54              ELSE
    55             v_string := v_string || t_words(i);
    56             v_string := v_string || CHR(10) || 'OR ';
    57              END IF;
    58            END LOOP;
    59 
    60            v_string := RTRIM (RTRIM (v_string, 'OR '), CHR(10));
    61            IF x = 2 THEN
    62              v_string := '$' || REPLACE (v_string, ' ', ' $');
    63            ELSIF x = 3 THEN
    64              v_string := 'NEAR(('
    65             || REPLACE (REPLACE (v_string, ' ', ','), CHR(10) || 'OR,',
    66                      '), 15, TRUE)' || CHR(10) || 'OR NEAR((')
    67             || '), 15, TRUE)';
    68            END IF;
    69            v_result := v_result || v_string;
    70            v_result := v_result || '</seq>';
    71          END LOOP;
    72        END LOOP;
    73    END IF;
    74    RETURN LTRIM (v_result, CHR(10));
    75  END seqs;
    76  /
    Function created.
    SCOTT@10gXE> sHOW ERRORS
    No errors.
    SCOTT@10gXE> -- examples of what seqs function returns:
    SCOTT@10gXE> VARIABLE g_words VARCHAR2(2000)
    SCOTT@10gXE> EXEC :g_words := 'word1 word2 word3 word4'
    PL/SQL procedure successfully completed.
    SCOTT@10gXE> SELECT seqs (:g_words) FROM DUAL
      2  /
    SEQS(:G_WORDS)
    <seq>word1 word2 word3 word4</seq>
    <seq>$word1 $word2 $word3 $word4</seq>
    <seq>NEAR((word1, word2, word3, word4), 15, TRUE)</seq>
    <seq>word1 word2 word3
    OR word1 word2 word4
    OR word1 word3 word4
    OR word2 word3 word4</seq>
    <seq>$word1 $word2 $word3
    OR $word1 $word2 $word4
    OR $word1 $word3 $word4
    OR $word2 $word3 $word4</seq>
    <seq>NEAR((word1,word2,word3), 15, TRUE)
    OR NEAR((word1,word2,word4), 15, TRUE)
    OR NEAR((word1,word3,word4), 15, TRUE)
    OR NEAR((word2,word3,word4), 15, TRUE)</seq>
    <seq>word1 word2
    OR word1 word3
    OR word1 word4
    OR word2 word3
    OR word2 word4
    OR word3 word4</seq>
    <seq>$word1 $word2
    OR $word1 $word3
    OR $word1 $word4
    OR $word2 $word3
    OR $word2 $word4
    OR $word3 $word4</seq>
    <seq>NEAR((word1,word2), 15, TRUE)
    OR NEAR((word1,word3), 15, TRUE)
    OR NEAR((word1,word4), 15, TRUE)
    OR NEAR((word2,word3), 15, TRUE)
    OR NEAR((word2,word4), 15, TRUE)
    OR NEAR((word3,word4), 15, TRUE)</seq>
    SCOTT@10gXE> EXEC :g_words := 'Acrylic Crochet Throws'
    PL/SQL procedure successfully completed.
    SCOTT@10gXE> SELECT seqs (:g_words) FROM DUAL
      2  /
    SEQS(:G_WORDS)
    <seq>Acrylic Crochet Throws</seq>
    <seq>$Acrylic $Crochet $Throws</seq>
    <seq>NEAR((Acrylic, Crochet, Throws), 15, TRUE)</seq>
    <seq>Acrylic Crochet
    OR Acrylic Throws
    OR Crochet Throws</seq>
    <seq>$Acrylic $Crochet
    OR $Acrylic $Throws
    OR $Crochet $Throws</seq>
    <seq>NEAR((Acrylic,Crochet), 15, TRUE)
    OR NEAR((Acrylic,Throws), 15, TRUE)
    OR NEAR((Crochet,Throws), 15, TRUE)</seq>
    SCOTT@10gXE> -- query with context index and contains
    SCOTT@10gXE> -- (not recommended, just used to show score)
    SCOTT@10gXE> CREATE INDEX test_idx1 ON test_tab (test_col)
      2  INDEXTYPE IS CTXSYS.CONTEXT
      3  /
    Index created.
    SCOTT@10gXE> SELECT test_col, score (1)
      2  FROM   test_tab
      3  WHERE  CONTAINS (test_col,
      4                   '<query>
      5                   <textquery>
      6                     <progression>'
      7                     || seqs (:g_words)
      8                     || '</progression>
      9                   </textquery>
    10                 </query>',
    11                   1) > 0
    12  /
    TEST_COL                                             SCORE(1)
    acrylic crochet throws                                     84
    acrylic crochets throwing                                  67
    acrylic word2 crochet word4 throws                         54
    acrylic crochet                                            34
    acrylic throws                                             34
    crochet throws                                             34
    acrylics crocheting                                        17
    acrylics throwing                                          17
    crocheting throw                                           17
    acrylic word2 crochet                                       3
    acrylic word2 throws                                        3
    crochet word2 throws                                        3
    12 rows selected.
    SCOTT@10gXE> -- query with ctxcat index and catsearch (recommended):
    SCOTT@10gXE> CREATE INDEX test_idx2 ON test_tab (test_col)
      2  INDEXTYPE IS CTXSYS.CTXCAT
      3  /
    Index created.
    SCOTT@10gXE> SELECT test_col
      2  FROM   test_tab
      3  WHERE  CATSEARCH (test_col,
      4                   '<query>
      5                   <textquery>
      6                     <progression>'
      7                     || seqs (:g_words)
      8                     || '</progression>
      9                   </textquery>
    10                 </query>',
    11                   NULL) > 0
    12  /
    TEST_COL
    acrylic crochet throws
    acrylic crochets throwing
    acrylic word2 crochet word4 throws
    acrylic crochet
    acrylic throws
    crochet throws
    acrylics crocheting
    acrylics throwing
    crocheting throw
    acrylic word2 crochet
    acrylic word2 throws
    crochet word2 throws
    12 rows selected.
    SCOTT@10gXE>

  • Action doesn't execute in player

    In the app I'm working on (AS 2.0) I have several buttons. I've added an action to each of those buttons:
    on (release)
        gotoAndPlay("fr_test");
    When in Flash, if I enable (Control) Simple Buttons and Simple Actions, this action works like it should. If I test the movie or publish it, the action doesn't execute.
    I've tried another approach with one button. I added an empty layer for actions only, and added the following code:
    this.test_btn.onRelease=function()
        gotoAndPlay("fr_test");
    This doesn't work at all, nor in Flash nor in the player. I wonder what I'm doing wrong here. Changing fr_test to the frame number does not change anything.

    I solved this by starting over with a new flash app. I created buttons and actions, and they worked like I wanted. Then I tried to apply this on the old movie, but that didn't work. So I recreated the movie in the new app. I'm using some very complex drawings, and I messed around quite a bit. I don't know where it went wrong, but it works now for me.

  • Search inside sections with progressive relaxation

    Hi,
    I am trying to search for the keywords within the XML. So my search will be made on a particular sections inside the XML. Say, i will search for the keyword Dog inside the tag <Animal>.
    My questions are,
    1. Is there any other way we can do it without using the within operator?
    2. If we are using within, will i be able to apply the progressive relaxation in the search keywords?
    3. Also, what is the use of SDATA. if i am using sdata, do i define all the tags in the XML (the tags in the XML are not generic and it may vary for each XML)?
    Thanks in advance.
    Regards,
    Loganathan

    I am trying to search for the keywords within the XML. So my search will be made on a particular sections inside the XML. Say, i will search for the keyword Dog inside the tag <Animal>.
    1. Is there any other way we can do it without using the within operator?Not that I know of. If you search without the within operator, then it would find the word in any tag.
    2. If we are using within, will i be able to apply the progressive relaxation in the search keywords?Yes.
    3. Also, what is the use of SDATA. if i am using sdata, do i define all the tags in the XML (the tags in the XML are not generic and it may vary for each XML)?Sdata is for structured data, not unstructured text data. The sdata needs to be in a separate column. If your tags are variable, then you can use ctxsys.auto_section_group.
    A lot of what you are asking about was discussed and demonstrated in the following recent thread:
    Query Templates and WITHIN

  • Please help explain strange behaviour of progressive relaxation..

    Hello
    I am building theo Oracle text querry and I stumbled on a behaviour which I cannot explain...
    here is the topo:
    I have created a synonym thusly:
    ctx_thes.create_relation('GR_THESAURUS','LEBOURGNEUF','SYN','BOURGNEUF');
    when I issue this select:
    SELECT      SCORE(1) NIVEAU_RECHERCHE, NOM,NO_MATRC,NO_NOM_REGST
    FROM DUMMY
    WHERE CONTAINS(nom, 'SYN(LEBOURGNEUF, GR_THESAURUS)', 1) > 0 ;
    I get the expected result set which containsentries with either 'LEBOURGNEUF' or 'BOURGNEUF'. So far so good.
    Now, when I combine search criterias using progressive relaxation, thus:
    SELECT SCORE(1) NIVEAU_RECHERCHE, DUMMY.NO_MATRC,DUMMY.NO_NOM_REGST,DUMMY.NOM
    FROM DUMMY
    WHERE CONTAINS(nom, '<query>
    <textquery lang="FRENCH" grammar="CONTEXT">LEBOURGNEUF golf
    <progression>
    <seq><rewrite>transform((TOKENS, "{", "}", "AND"))</rewrite></seq>
    <seq><rewrite>transform((TOKENS, "{", "}", "OR"))</rewrite></seq>
    <seq><rewrite>transform((TOKENS, "SYN(", ",GR_THESAURUS)", "OR"))</rewrite></seq>
    </progression>
    </textquery>
    <score datatype="INTEGER" algorithm="DEFAULT"/>
    </query>', 1) > 0;
    I do NOT get any results matching synonym 'BOURGNEUF'.. only those with 'LEBOURGNEUF' are returned...
    further, if I intentionaly make a syntax error in the line
    <seq><rewrite>transform((TOKENS, "SYN(", ",GR_THESAURUS)", "OR"))</rewrite></seq>
    say like this:
    <seq><rewrite>transform((TOKENS, "xSYN(", ",GR_THESAURUS)", "OR"))</rewrite></seq>
    no error is returned and I get the same result set...
    so this leads me to conclude that only the first two lines of the query are parsed/executed...
    does anyone here have any ideas what is going one here?
    in the preceding quire I neeed to add
                                                      <seq><rewrite>transform((TOKENS, "SYN(", ",GR_THESAURUS)", "AND"))</rewrite></seq>
    <seq><rewrite>transform((TOKENS, "SYN(", ",GR_THESAURUS)", "OR"))</rewrite></seq>
    and possibly
    <seq><rewrite>transform((TOKENS, "NT(", ",2,GR_THESAURUS)", "OR"))</rewrite></seq>
    can this be done???
    why is there no errors when I execute the query (in sqldeveloper) ???
    any hints will be greatly appreciated!
    Cheers
    Edited by: user8848610 on 2009-10-29 07:46

    now it works... although the simpler and cleaner solution of using transform would have been perfect, this function does a somewhat adequate job... I put it here so maybe it will help others ;)
         FUNCTION BuildSearchPredicate (texte IN NOM_ASSJT.NOM%TYPE) RETURN VARCHAR2 IS
         sSQL VARCHAR2(5000);
         sSeq1 VARCHAR2(1000);
         sSeq2 VARCHAR2(1000);
         sSeq3 VARCHAR2(1000);
         iFirst NUMBER(1);
         iPosition NUMBER;
         iToken NUMBER;
         CURSOR curWords(line_text IN VARCHAR2)      IS      
                   select regexp_substr(line_text, '[^ ]+', 1, level) word
                   from dual
                   connect by regexp_substr(line_text, '[^ ]+', 1, level) is not null;
         BEGIN
         sSQL := sSQL || '<query><textquery lang="FRENCH" grammar="CONTEXT"><progression> ';
         sSeq1 := '';
         iFirst := 1;
         iToken := 0;
         FOR r_curWord IN curWords(texte)
         LOOP
         iToken := iToken + 1;
         IF iFirst = 0 THEN
                   sSeq1 := sSeq1 || ' AND {' || trim(r_curWord.word) || '}';
                   sSeq2 := sSeq2 || ' OR {' || trim(r_curWord.word) || '}';
                   sSeq3 := sSeq3 || ' OR SYN(' || trim(r_curWord.word) || ',GR_THESAURUS)';
              ELSE
                   sSeq1 := '{' || trim(r_curWord.word) || '}';
                   sSeq2 := '{' || trim(r_curWord.word) || '}';
                   sSeq3 := 'SYN(' || trim(r_curWord.word) || ',GR_THESAURUS)';
                   iFirst := 0;
              END IF;
         END LOOP;
         sSQL := sSQL || '<seq>' || sSeq1 || '</seq>';
         iPosition := instr(sSeq1, ' AND ');
         IF instr(sSeq1, ' AND ',iPosition + 1) > 0 THEN -- we must have at least 2 AND operator for this to make sense
              WHILE iPosition > 0
              LOOP
    IF instr(substr(sSeq1, iPosition + 5), ' AND ') > 0 THEN
    sSQL := sSQL || '<seq>' || substr(sSeq1, iPosition + 5) || '</seq>';
    END IF;
                   iPosition := instr(sSeq1, ' AND ', iPosition + 1);
              END LOOP;
         END IF;
         IF iToken > 1 THEN -- no use in having OR if there is only one word
              sSQL := sSQL || '<seq>' || sSeq2 || '</seq>';
         END IF;
         sSQL := sSQL || '<seq>' || sSeq3 || '</seq>';
         RETURN sSql;
         END BuildSearchPredicate;     
    END GR_RECH;
    this will combine search words using AND and OR and SYN like so:
    SELECT GR_RECH.BuildSearchPredicate('LEBOURGNEUF GOLF') FROM DUAL;
    will result in :
    <query><textquery lang="FRENCH" grammar="CONTEXT"><progression> <seq>{LEBOURGNEUF} AND {GOLF}</seq><seq>{LEBOURGNEUF} OR {GOLF}</seq><seq>SYN(LEBOURGNEUF,GR_THESAURUS) OR SYN(GOLF,GR_THESAURUS)</seq>
    thanks for you help!
    cheers
    gth

  • Syncing iphone and can't seem to transfer audiobooks that i have put in a playlist.  Sync menu doesn't show all playlists.  Help

    syncing iphone and can't seem to transfer audiobooks that i have put in a playlist.  Sync menu doesn't show all playlists.  Help

    I have the same problem with podcast playlists.  When I go to the music window in my iPhone devices section, the playlists I have created on my macbook pro in iTunes do not appear as an option to sync with the iPhone.  I know some web radios streams, like the BBC, won't transfer because of compatibility issues, but the playlists of podcasts that I have created consist entirely of podcasts downloaded from the podcasts section on the iTunes Music Store.  They used to show up and sync properly before I upgraded to OS 5.1.1, but now they don't.
    Does anyone have a fix and am I right in surmising that the cause is a glitch in OS 5.1.1?

  • I have Elements 11. Sometimes, if I edit a photo in Elements Editor, the date gets changed to the current date. Why does that happen? It doesn't happen all the time, so I can't isolate the cause. Any ideas?

    I have Elements 11. Sometimes, if I edit a photo in Elements Editor, the date gets changed to the current date. Why does that happen? It doesn't happen all the time, so I can't isolate the cause. Any ideas?

    I have Elements 11. Sometimes, if I edit a photo in Elements Editor, the date gets changed to the current date. Why does that happen? It doesn't happen all the time, so I can't isolate the cause. Any ideas?

  • Help. I can´t slide to answer when the phone rings, and i´m missing a lot of phone calls! It doesn´t happens all the time but quite enough to be annoying. I´v restarted and updated it. Suggestions? Thanks

    Help. I can´t slide to answer when the phone rings, and i´m missing a lot of phone calls! It doesn´t happens all the time but quite enough to be annoying. I´v restarted and updated it. Suggestions? Thanks

    When you said you have no fax machines on your line, that does include computers directly connected to the phone line?
    The reason that I ask is a computer with a dial-up modem (a non broadband modem) that can connect to your phone line, can have software that makes the computer act as a fax machine.
    If you are the original poster (OP) and your issue is solved, please remember to click the "Solution?" button so that others can more easily find it. If anyone has been helpful to you, please show your appreciation by clicking the "Kudos" button.

  • Does anyone get a vibration sound when talking on the iPhone6? It doesn't happen all the time and happens with talking to different people.

    Does anyone get a vibration sound when talking on the iPhone6? It doesn't happen all the time and happens with talking to different people. I have tried to troubleshoot it, but can't find a answer.

    Hey CEVYNBARRY!
    Here is an article for you that will help you address this issue:
    Troubleshooting "A connection failure has occurred", "The specified server could not be found" or similar messages
    http://support.apple.com/kb/ts1843
    Take care, and thanks for visiting the Apple Support Communities.
    -Braden

  • Safari show all tabs doesn't work all the time

    It is annoying: safari show all tabs doesn't work all the time. The little icon to the right of the "New Tab" area sometimes works, and sometimes doesn't. The Shift Command Back-slash, sometimes works, and sometimes doesn't. I find no rhyme nor reason for this. I have a MacBook Pro, Mountain Lion, the latest updates. It doesn't matter if I am in Full Screen or not.
    I am quite confused regarding this.

    Open the Finder. From the Finder menu bar click Go > Go to Folder
    Type of copy paste the following:
    ~/Library/Caches/com.apple.Safari/Cache.db
    Click Go then move the Cache.db file to the Trash.
    Quit and relaunch Safari to test.
    If that helped, empty the cache more often from your keyboard.
    Command + Option + E

  • When first loading, FIREFOX doesn't open all the way.

    When I first open FIREFOX, it doesn't open all the way. When I open another, FIREFOX

    Hi weaver15,
    You should try changing your home page to:
    about:home
    I think this is probably the page you are looking for. If you don't know how to change the home page, you should take a look at the Knowledge Base article [[How to set the home page]].
    Hopefully this helps

  • IPad doesn't charge all the time

    Ipad doesn't charge all the time

    Could be the charger, cable or iPad. Plug the USB cable into your computer. It may say "Not Charging", however, it is charging slowly and will verify that the cable is good.
    Try this first - Reset the iPad by holding down on the Sleep and Home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons. (This is equivalent to rebooting your computer.)
    The quickest way (and really the only way) to charge your iPad is with the included 10W or 12W (5W on Mini) USB Power Adapter. iPad will also charge, although more slowly, when attached to a computer with a high-power USB port (many recent Mac computers) or with an iPhone Power Adapter (5W). When attached to a computer via a standard USB port (2.5W, most PCs or older Mac computers) iPad will charge very slowly (but iPad indicates not charging). Make sure your computer is on while charging iPad via USB. If iPad is connected to a computer that’s turned off or is in sleep or standby mode, the iPad battery will continue to drain.
    Apple recommends that once a month you let the iPad fully discharge & then recharge to 100%.
    How to Calibrate Your Mac, iPhone, or iPad Battery
    http://www.macblend.com/how-to-calibrate-your-mac-iphone-or-ipad-battery/
    At this link http://www.tomshardware.com/reviews/galaxy-tab-android-tablet,3014-11.html , tests show that the iPad 2 battery (25 watt-hours) will charge to 90% in 3 hours 1 minute. It will charge to 100% in 4 hours 2 minutes. The new iPad has a larger capacity battery (42 watt-hours), so using the 10W charger will obviously take longer. If you are using your iPad while charging, it will take even longer. It's best to turn your new iPad OFF and charge over night. Also look at The iPad's charging challenge explained http://www.macworld.com/article/1150356/ipadcharging.html
    Also, if you have a 3rd generation iPad, look at
    Apple: iPad Battery Nothing to Get Charged Up About
    http://allthingsd.com/20120327/apple-ipad-battery-nothing-to-get-charged-up-abou t/
    Apple Explains New iPad's Continued Charging Beyond 100% Battery Level
    http://www.macrumors.com/2012/03/27/apple-explains-new-ipads-continued-charging- beyond-100-battery-level/
    New iPad Takes Much Longer to Charge Than iPad 2
    http://www.iphonehacks.com/2012/03/new-ipad-takes-much-longer-to-charge-than-ipa d-2.html
    Apple Batteries - iPad http://www.apple.com/batteries/ipad.html
    iPhone: Hardware troubleshooting (Power/Battery section also applies to iPad)
    http://support.apple.com/kb/TS2802
    Extend iPad Battery Life (Look at pjl123 comment)
    https://discussions.apple.com/thread/3921324?tstart=30
    iOS 7 Battery Life Draining Too Fast? It’s Easy to Fix
    http://osxdaily.com/2013/09/19/ios-7-battery-life-fix/
    New iPad Slow to Recharge, Barely Charges During Use
    http://www.pcworld.com/article/252326/new_ipad_slow_to_recharge_barely_charges_d uring_use.html
    iPad: Charging the battery
    http://support.apple.com/kb/HT4060
    Best Practices for iPad Battery Charging
    http://www.ilounge.com/index.php/articles/comments/best-practices-for-ipad-batte ry-charging/
    Tips About Charging for New iPad 3
    http://goodscool-electronics.blogspot.com/2012/04/tips-about-charging-for-new-ip ad-3.html
    How to Save and Prolong the battery life of your new ipad
    https://discussions.apple.com/thread/4480944?tstart=0
    Prolong battery lifespan for iPad / iPad 2 / iPad 3: charging tips
    http://thehowto.wikidot.com/prolong-battery-lifespan-for-ipad
    iPhone, iPod, Using the iPad Charger
    http://support.apple.com/kb/HT4327
    Install and use Battery Doctor HD
    http://itunes.apple.com/tw/app/battery-doctor-hd/id459702901?mt=8
    To Extend a Device’s Battery Life, Get to Know It Better
    http://tinyurl.com/b67c7xz
    iPad Battery Replacement
    http://www.apple.com/batteries/replacements.html
    In rare instances when using the Camera Connection Kit, you may notice that iPad does not charge after using the Camera Connection Kit. Disconnecting and reconnecting the iPad from the charger will resolve this issue.
     Cheers, Tom

Maybe you are looking for

  • How to set up Airport Extreme for 11ac and 11n?

    I have just purchased the new Airport Extreme (August 2014) because Apple's website states Simultaneous dual-band support. AirPort Extreme features simultaneous dual-band 802.11ac Wi‑Fi. That means it transmits at both the 2.4GHz and 5GHz frequencies

  • Contrast / Gamma Different in Canvas and Desktop Preview

    *The Confusion:* The contrast of my video differs between the Canvas Window and Desktop Preview. I assume the two are using different gamma settings. But I can't figure out what's going on, to know what those settings are and how to assess the final

  • Warning while importing MPP into Primavera

    i get this warning while Importing MPP(from MS project 2003) into primavera (P6r7)-- WARNING: Unresolved foreign key is being nulled. Table : TASK, Foreign Table : RSRC, Field : rsrc_id, value : 13 can u pl explain what this means and which area migh

  • Error in Activate Visio 2013

    Purchased Visio 2013 via Microsoft HUP - getting the following error when trying to activate:- <$>

  • Middle button wont work

    so i accuired an old ipod classic, 30gb, and the middle button will not work. it clicks, but wont make an action. i can still go through the menu, but cant go any farther. any help me?