fuzzy search

Hi, we need fuzzy search on the table who have 20 million records and willingness to develop continually add 20 K records every day. Our application is J2EE env where we do a jndi call to the database and run queries. Fuzzy search question what we have is the query to look EO_Short_Name similar as TestName and returns, as it scans the entire table taking a long time to retrieve the records of 20 TR_Details table.

SELECT tt. TRADER_D                                                                 FROM pp.TR_DETAILS TDMESSAGE                                                                    WHERE                                                                 UPPER(TDMESSAGE. EO_SHORT_NAME) LIKE '% TestName % '.

The table above have record 20 and we'll be adding K records 20 every day. Can someone approach the tips that we can follow to solve the problem above for large data...

Thanks in advance

SSR1234 wrote:

Hello

I'm always looking for a solution for the fuzzy search on the oracle database query.

What exactly is the problem with the oracle text?

Tags: Database

Similar Questions

  • Fuzzy search help (does not work if change the order of some 2 letters)

    Hello

    need help with search fuzzy. It's pretty simple - we use fuzzy search on varchar2 columns that contain the name and name. The problem is that I don't really understand why she can't find the name in some cases.

    I want to get "Taekpaul". Then

    where CONTAINS (first_name, 'fuzzy (TAEKPAUL)', 1) > 0 - work
    where CONTAINS (first_name, 'fuzzy (TAEKPALU)', 1) > 0 - works (amended order to the last 2 letters)
    When CONTAINS (first_name, 'fuzzy (TEAKPAUL)', 1) > 0 - does not work, see "Brahim" is completely different (changed to the 2nd and 3rd order)

    How can I find 'Taekpaul', even if I get TEAKPAUL? Is she related to the index? As the text index must be created with different settings?

    Thank you!

    Published by: Maitreya2 on March 3, 2010 14:08

    Hello

    I tried you have case, and I get the same results. I also tried with the soundex function "!" and gives me the result, so I tried this:

    where CONTAINS(first_name,'fuzzy(!TEAKPAUL)',1) > 0
    

    The difference is the "!" in front of the searchterm. Is this really the solution to your problem?

    Herald tiomela
    Superconsult.nl

  • Multiple FUZZY search in MULTI_COLUMN_DATASTORE?

    Hello

    How is it possible to use the FUZZY operator by combining two criteria to search through AND?
    Attached is an example of using the old syntax for the *'? ' * operator. But how is it possible
    to use FUZZY here? Unfortunately there is no example.

    ("FUZZY({mytext%}, 60, 500, N) IN textcol AND FUZZY({1%}, 60, 100, N) IN datecol';")
    does not work = > no selected rows).

    Thanks in advance!

    ----------------------------------------------------------------------------------------------------------------
    CREATE TABLE TEMP_FUZZY
    (
      TEXTCOL  VARCHAR2(2000 BYTE),
      DATECOL  VARCHAR2(2000 BYTE)
    );
    
    INSERT ALL
     INTO TEMP_FUZZY VALUES ('myt', '1958')
     INTO TEMP_FUZZY VALUES ('myt', '2009')
     INTO TEMP_FUZZY VALUES ('mytex', '1958')
     INTO TEMP_FUZZY VALUES ('mytex', '2009')
     INTO TEMP_FUZZY VALUES ('mytext', '1958')
     INTO TEMP_FUZZY VALUES ('mytext', '2009')
     INTO TEMP_FUZZY VALUES ('mytext-is', '1958')
     INTO TEMP_FUZZY VALUES ('mytext-is', '2009')
     INTO TEMP_FUZZY VALUES ('mytext-is-long', '1958')
     INTO TEMP_FUZZY VALUES ('mytext-is-long', '2009')
     INTO TEMP_FUZZY VALUES ('mytext-is-longer', '1958')
     INTO TEMP_FUZZY VALUES ('mytext-is-longer', '2009')
    SELECT * FROM DUAL;
     
    COMMIT;
    
    DECLARE
    
      v_column VARCHAR2(2000);
    
    BEGIN
    
      v_column := 'textcol, datecol';
    
      CTX_DDL.CREATE_PREFERENCE ('temp_fuzzy_pref', 'MULTI_COLUMN_DATASTORE');
      CTX_DDL.SET_ATTRIBUTE     ('temp_fuzzy_pref', 'COLUMNS', v_column );
    
    END;
    / 
    
    CREATE INDEX idx_temp_fuzzy ON temp_fuzzy (textcol)
     INDEXTYPE IS CTXSYS.CONTEXT
     PARAMETERS ('DATASTORE  ctxsys.temp_fuzzy_pref SECTION GROUP CTXSYS.AUTO_SECTION_GROUP STOPLIST CTXSYS.EMPTY_STOPLIST');
    
    
    COLUMN textcol FORMAT a10
    COLUMN datecol FORMAT a20
    
    VARIABLE bnd VARCHAR2(200)
    
    EXEC :bnd := '?mytext% WITHIN textcol AND ?1% WITHIN datecol';
    
    SELECT SCORE(0), textcol, datecol 
      FROM temp_fuzzy
     WHERE CONTAINS(textcol, :bnd, 0 ) > 0;
    
      SCORE(0) TEXTCOL              DATECOL
    ---------- -------------------- ----------
             3 mytext-is-longer     1958
             3 mytext-is-long       1958
             3 mytext-is            1958
             3 mytext               1958
             3 mytex                1958

    Your syntax IS correct, but the second part of the query can't find anything.

    Your problem is that you mentioned the search terms with curly brackets (braces).

    {mytext %} tells Oracle to look up the word real mytext %, rather than the expansion with the '%' character.

    % Being a newline character, he is not respected, and if Oracle research "mytext" - she finds.

    In the same way with {1 %} Oracle looks like '1' that he is not - if the search fails .}

  • Try to pass a variable of fuzzy search

    I'm writing the code like this:
         
       for x in 1 .. 6 loop
           v_searchword := listgetat(replace(p_searchphrase,',',' '),x,' ');
           
           for c1 in (select * from
                          (select score(1) as score, searchterms, suggestions from suggestions_table 
                           where contains(searchterms,'fuzzy({'||v_searchword||'},,,weight)',1)>0 
                           order by score desc)
                       where rownum < 10) loop                                     
            end loop;                   
       end loop;
    A person spends in a sentence long search. I separate into words and take up the first 6. The pun is locked. Each word in turn is assigned to the variable v_searchword. I then a fuzzy Oracle text search on that Word. The code above, however, gives me an error of Oracle text parser (DRG-50901: text query parser syntax... error).

    I modified the code so that the most important line reads * where contains (searchterms, 'fuzzy({v_searchword},,,weight)', 1) > 0 *, and while that does not produce a syntax error, it produces no results, either! The words that I know will generate suggestions when I do a manual search of fuzzy in plain SQL (for example "womman" and "tomartoe") do not generate anything in this case, because (I think) instead of searching for "womman" or "tomartoe", it is actually just searching for the word "v_searchword" every time.

    Could someone tell me how to write my code so that the correct word is passed in contains function it each time as you please? Syntactically not, it seems very difficult, but I'm stumped!

    If the value of v_searchword is null it would result in an invalid syntax, looking for {}. This would happen if there was no such item, as no word sixth in a string of five words. You can also delete Workspaces duplciate of the chain. Please see the demo below that replicates first, then corrects the error by adding a condition that is simply that v_searchword is not null.

    SCOTT@orcl_11g> create table suggestions_table
      2    (searchterms  varchar2 (30),
      3       suggestions  varchar2 (20))
      4  /
    
    Table created.
    
    SCOTT@orcl_11g> insert all
      2  into suggestions_table values ('woman', null)
      3  into suggestions_table values ('women', null)
      4  into suggestions_table values ('tomato', null)
      5  into suggestions_table values ('tomatoes', null)
      6  select * from dual
      7  /
    
    4 rows created.
    
    SCOTT@orcl_11g> create index your_index
      2  on suggestions_table (searchterms)
      3  indextype is ctxsys.context
      4  /
    
    Index created.
    
    SCOTT@orcl_11g> CREATE OR REPLACE FUNCTION listgetat
      2       (p_string    VARCHAR2,
      3        p_element   INTEGER,
      4        p_separator VARCHAR2 DEFAULT ' ')
      5       RETURN          VARCHAR2
      6  AS
      7    v_string      VARCHAR2 (32767);
      8  BEGIN
      9    -- ensure there are starting and ending separators:
     10    v_string := p_separator || p_string || p_separator;
     11    -- remove all double separators:
     12    WHILE INSTR (v_string, p_separator || p_separator) > 0 LOOP
     13        v_string := REPLACE (v_string, p_separator || p_separator, p_separator);
     14    END LOOP;
     15    -- check if element exists:
     16    IF LENGTH (v_string) - LENGTH (REPLACE (v_string, p_separator, '')) >
     17         LENGTH (p_separator) * p_element
     18    THEN
     19        v_string := SUBSTR (v_string,
     20                      INSTR (v_string, p_separator, 1, p_element)
     21                      + LENGTH (p_separator));
     22        RETURN SUBSTR (v_string, 1, INSTR (v_string, p_separator) - 1);
     23    ELSE
     24        RETURN NULL;
     25    END IF;
     26  END listgetat;
     27  /
    
    Function created.
    
    SCOTT@orcl_11g> -- reproduction of error:
    SCOTT@orcl_11g> create or replace procedure test_proc
      2    (p_searchphrase     in varchar2)
      3  as
      4    v_searchword    varchar2 (100);
      5  begin
      6       for x in 1 .. 6 loop
      7           v_searchword := listgetat(replace(p_searchphrase,',',' '),x,' ');
      8
      9           for c1 in (select * from
     10                    (select score(1) as score, searchterms, suggestions from suggestions_table
     11                     where contains(searchterms,'fuzzy({'||v_searchword||'},,,weight)',1)>0
     12                     order by score desc)
     13                 where rownum < 10) loop
     14              dbms_output.put_line
     15             (lpad (c1.score, 3) || ' ' ||
     16              rpad (c1.searchterms, 30) || ' ' ||
     17              v_searchword);
     18            end loop;
     19       end loop;
     20  end test_proc;
     21  /
    
    Procedure created.
    
    SCOTT@orcl_11g> show errors
    No errors.
    SCOTT@orcl_11g> exec test_proc ('womman,and,tomartoe')
    38 woman                          womman
    25 women                          womman
    29 tomato                         tomartoe
    26 tomatoes                       tomartoe
    BEGIN test_proc ('womman,and,tomartoe'); END;
    
    *
    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 8
    ORA-06512: at "SCOTT.TEST_PROC", line 9
    ORA-06512: at line 1
    
    SCOTT@orcl_11g> -- correction of error:
    SCOTT@orcl_11g> create or replace procedure test_proc
      2    (p_searchphrase     in varchar2)
      3  as
      4    v_searchword    varchar2 (100);
      5  begin
      6       for x in 1 .. 6 loop
      7           v_searchword := listgetat(replace(p_searchphrase,',',' '),x,' ');
      8           -- check if xth word exists:
      9           if v_searchword is not null then
     10             for c1 in (select * from
     11                      (select score(1) as score, searchterms, suggestions from suggestions_table
     12                       where contains(searchterms,'fuzzy({'||v_searchword||'},,,weight)',1)>0
     13                       order by score desc)
     14                   where rownum < 10) loop
     15             dbms_output.put_line
     16               (lpad (c1.score, 3) || ' ' ||
     17                rpad (c1.searchterms, 30) || ' ' ||
     18                v_searchword);
     19              end loop;
     20           end if;
     21       end loop;
     22  end test_proc;
     23  /
    
    Procedure created.
    
    SCOTT@orcl_11g> show errors
    No errors.
    SCOTT@orcl_11g> exec test_proc ('womman,and,tomartoe')
    38 woman                          womman
    25 women                          womman
    29 tomato                         tomartoe
    26 tomatoes                       tomartoe
    
    PL/SQL procedure successfully completed.
    
    SCOTT@orcl_11g> 
    
  • Fuzzy search Orcle text on multilingual (English/French)

    Hello

    I use Oracle 11.2, I would like to make text fuzzy match on column contains the English and French letters. How can I set the value for FUZZY_MATCH via ctx_ddl.set_attribute

    Thanks in advance!

    create a tb_class (varchar2 (20) nm, addr varchar2 (200));
    insert into tb_class ('cadfecc', 'Paris'); commit;

    Start
    ctx_ddl.set_attribute ('STEM_FUZZY_PREF', 'FUZZY_MATCH', 'FRENCH'); ... It is only for the French?
    end;

    create index class_nm_idx on tb_class (nm) indextype is ctxsys.context parameters ("list STEM_FUZZY_PREF sync (on commit)" ");

    Select * from tb_class where contains (nm, 'cadfcc', weight)', 1) > 0;
    SCOTT@orcl_11gR2> create table tb_class
      2    (nm    varchar2 ( 20),
      3       addr  varchar2 (200))
      4  /
    
    Table created.
    
    SCOTT@orcl_11gR2> insert into tb_class values ('çadfécc', 'Paris')
      2  /
    
    1 row created.
    
    SCOTT@orcl_11gR2> begin
      2    ctx_ddl.create_preference
      3        ('STEM_FUZZY_PREF', 'BASIC_WORDLIST');
      4    ctx_ddl.set_attribute
      5        ('STEM_FUZZY_PREF', 'STEMMER', 'AUTO');
      6    ctx_ddl.set_attribute
      7        ('STEM_FUZZY_PREF', 'FUZZY_MATCH', 'AUTO');
      8    ctx_ddl.create_preference
      9        ('LEXER_PREF', 'BASIC_LEXER');
     10    ctx_ddl.set_attribute
     11        ('LEXER_PREF', 'BASE_LETTER', 'YES');
     12  end;
     13  /
    
    PL/SQL procedure successfully completed.
    
    SCOTT@orcl_11gR2> create index class_nm_idx
      2  on tb_class (nm)
      3  indextype is ctxsys.context
      4  parameters
      5    ('wordlist  STEM_FUZZY_PREF
      6        sync        (on commit)
      7        lexer        LEXER_PREF')
      8  /
    
    Index created.
    
    SCOTT@orcl_11gR2> select * from tb_class
      2  where  contains (nm, 'fuzzy (çadfcc, 1, 5000, weight)', 1) > 0
      3  /
    
    NM
    --------------------
    ADDR
    --------------------------------------------------------------------------------
    çadfécc
    Paris
    
    1 row selected.
    
  • List of words used in the fuzzy search

    Hi all

    I would like to know if there is anyway that I can get the list of words that looks blurry.

    for example

    I have a "Stabilizer" Word and I do a blur on this? " Stabilizer "." The result set will include misspellings etc. I want to know what are all the words (spelling mistakes) are included by oracle in the search.

    Thank you
    G

    No, you will need to call for each partition in turn.

  • Light make the fuzzy search and pixelated.

    Hello world!

    I used the Source without Pro font for my site and the texts written in a style light look different when the page is published. The text seems broken, and it reads well.

    Is it possible to improve this? I have tested the site in Chrome and Safari, and it looks the same in both entities.

    Thanks for your help!

    My site: www.los400cortes.com.ar

    Captura de pantalla 2016-06-09 a la(s) 03.55.49 p.m..png

    Captura de pantalla 2016-06-09 a la(s) 03.56.16 p.m..png

    Hi, Delfina,.

    Looks like you are using a system font on your site. System fonts are exported in the form of images, because not all users are guaranteed to have that font installed on their machine. Take a look at this help page which explains the different types of fonts in Muse: Using typography and fonts in Adobe Muse

    Source without Pro is available through Typekit fonts both Web dashboard. Try to upgrade to the version of Web fonts and see if things seem better. If she isn't always look right, then perhaps consider using a different font.

    Best,

    Anna

  • performance of the 10g search text fuzzy

    Hello to all members of this community,

    IM new to this and I have a question that belongs to the Oracle 10g text.

    My configuration:

    Oracle Database 10 g Enterprise Edition Release 10.2.0.4.0 - 64 bit

    8 cores with each 2,5 GHz

    64 GB OF RAM

    What I would do:

    I would like to compare a large amount of games of lines between them so that human caused errors (e.g. spelling, typos) will not be tolerated.

    My setup of CONTEXT of the TEXT is as follows:

    MULTI_COLUMN_DATASTORE with each column to compare.

    begin
      ctx_ddl.create_preference('my_datastore', 'MULTI_COLUMN_DATASTORE');
      ctx_ddl.set_attribute('my_datastore', 'columns', 'column1, ...'); 
    end;
    

    BASIC_LEXER - with the parameters of the GERMANS:

    begin
       ctx_ddl.create_preference('my_lexer', 'BASIC_LEXER');
       ctx_ddl.set_attribute('my_lexer', 'index_themes', 'NO');
       ctx_ddl.set_attribute('my_lexer', 'index_text', 'YES');
       ctx_ddl.set_attribute('my_lexer', 'alternate_spelling', 'GERMAN');
       ctx_ddl.set_attribute('my_lexer', 'composite', 'GERMAN');
       ctx_ddl.set_attribute('my_lexer', 'index_stems', 'GERMAN');
       ctx_ddl.set_attribute('my_lexer', 'new_german_spelling', 'YES');
    end;
    

    BASIC_WORDLIST - with the parameters of the GERMANS:

    begin
       ctx_ddl.create_preference('my_wordlist', 'BASIC_WORDLIST');
       ctx_ddl.set_attribute('my_wordlist','FUZZY_MATCH','GERMAN');
       ctx_ddl.set_attribute('my_wordlist','FUZZY_SCORE','60'); --defaults
       ctx_ddl.set_attribute('my_wordlist','FUZZY_NUMRESULTS','100'); --defaults
       --ctx_ddl.set_attribute('my_wordlist','SUBSTRING_INDEX','TRUE'); --uncommented due to long creation time of index
       ctx_ddl.set_attribute('my_wordlist','STEMMER','GERMAN');
    end;
    

    And a BASIC_SECTION_GROUP with a field_section for each column.

    begin
      ctx_ddl.create_section_group(
        group_name => 'my_section_group', 
        group_type => 'BASIC_SECTION_GROUP'
      );
      ctx_ddl.add_field_section(
        group_name   => 'my_section_group',
        section_name => 'column1',
        tag          => 'column1'
      );
    ...
    end;
    

    I create the index with

    create index idx_myfulltextindex on fulltexttest(column1)
    indextype is ctxsys.context
    parameters ('datastore my_datastore 
                 section group my_section_group 
                 lexer my_lexer
                 wordlist my_wordlist 
                 stoplist ctxsys.empty_stoplist')
    

    Everything works well functionally.

    In my test scenario, I had a table with lines about 100,000 that has a primary key that is not in the CONTEXT index.

    The problem:

    I do a query like:

    SELECT SCORE(1), a.* 
    FROM fulltexttest a 
    WHERE CONTAINS(a.column1, 'FUZZY(({TEST}),,,W) WITHIN COUMN1', 1) 
      AND a.primkey BETWEEN 1000 AND 4000
    

    This will do a full text search in a set of 3000 lines. Here, the response time is almost immediate. Maybe a second.

    If I do the same in a slider repeatedly (> 1000) with various search terms, we take one of course a lot of time. It does in the average 1 requests per second.

    I thought that this cannot be that slow and I tested the same with:

    SELECT SCORE(1), a.* 
    FROM fulltexttest a 
    WHERE CONTAINS(a.column1, '({TEST}) WITHIN COUMN1', 1) 
      AND a.primkey BETWEEN 1000 AND 4000
    

    NOTE there is no fuzzy search more...

    With that, it is up to 20 times faster.

    The cpu of the server about 15% charge when the fuzzy query processing.

    So:

    If I do a fuzzy search, it seems do not access the index. I thought I was saying to the index to calculate the results of 100 extensions in advance.

    I'm doing it wrong? Or is it not possible to build a particular Index to the fuzzy search?

    Are there suggestions to improve performance? Note that I have already read the guide (7 Tuning Oracle Text). None caused advice cure.

    I would be grateful if anyone can help me in this case... Or simply to give an indication.

    Thank you

    Dominik

    The attributes of a list of words can be used to specify how developed the stems and fuzzies create prefix and substring index.

    If you do a lot of research with generic characters from end, like partialword % then a prefix index can make these quick searches.  If you do the research with two wildcard characters, such as % partialword % then an index of the substring can make this faster research.  There is a trade-off between taking time and storage space to create and maintain the index with prefixes and/or substrings and time of the query.  You can specify the minimum length of a prefix.  The shorter length, prefixes no longer possible and the longer it takes to create the largest index.  So you need to use depends on what types of queries you expect most of the time.

    I don't know if you have tested from queries.  The attribute index_stems of the lexer and the attribute of forms derived from the word list generator are in conflict.  You must keep the generator attribute of forms derived from the list of words and do not use the attribute index_stems of the lexer.

  • Disqualification Siebel connector plus? = Search fuzzy

    Hello

    is it possible to use the Disqualification Oracle Siebel Connector, for the purpose of a fuzzy search to expand the research capabilities of Siebel?

    I can imagine that it is possible to create a workflow process that calls a Disqualification webservice via an integration object. I wonder if there is a solution that is to any integration effort.

    Thank you

    Daniel

    Integration of the Disqualification can be enabled on the interface of fuzzy query of Siebel. There should be some details about it in the DQ Siebel Administration Guide.

  • How will I know what search fuzzy matching word

    I tried to find something about my problem, but research has resulted in no relevant thread. I do not use fuzzy to search text, but the names and I use it mainly to work even if the user misspelled the name of a resource.

    In order to set the search I want to know what the fuzzy search word was actually and what was the outcome for this match.

    So if I search for 'sumer' I get hit for "hot summer" and the relationship is clear. But if I get soon "swimming is not possible that the Summit ends" the blow is not clear more.

    You can use fuzzy with weight and use the partition function for the score. You can use ctx_doc.highlight to get the positions (offsets and length) of the matching words and then use it in a function in pipeline to return these words and this function in your query. Please see the demo below.

    -data and index table:

    SCOTT@orcl_11gR2> CREATE TABLE test_tab
      2    (test_col  VARCHAR2(46))
      3  /
    
    Table created.
    
    SCOTT@orcl_11gR2> INSERT ALL
      2  INTO test_tab VALUES ('warm summer')
      3  INTO test_tab VALUES ('soon swimming is not possible as summit closes')
      4  INTO test_tab VALUES ('other data')
      5  SELECT * FROM DUAL
      6  /
    
    3 rows created.
    
    SCOTT@orcl_11gR2> CREATE INDEX test_idx
      2  ON test_tab (test_col)
      3  INDEXTYPE IS CTXSYS.CONTEXT
      4  /
    
    Index created.
    

    -function

    SCOTT@orcl_11gR2> create or replace function get_words
      2    (p_idx          in varchar2,
      3       p_rid          in rowid,
      4       p_query      in varchar2,
      5       p_col          in varchar2)
      6    return          sys.odcivarchar2list
      7    authid          definer
      8    pipelined
      9  as
     10    v_hightab     ctx_doc.highlight_tab;
     11  begin
     12    ctx_doc.set_key_type ('rowid');
     13    ctx_doc.highlight (p_idx, p_rid, p_query, v_hightab);
     14    for i in 1 .. v_hightab.count loop
     15        pipe row
     16          (dbms_lob.substr
     17            (p_col,
     18             v_hightab(i).length,
     19             v_hightab(i).offset));
     20    end loop;
     21    return;
     22  end get_words;
     23  /
    
    Function created.
    
    SCOTT@orcl_11gR2> show errors
    No errors.
    

    -Research:

    SCOTT@orcl_11gR2> VARIABLE search_string VARCHAR2(100)
    SCOTT@orcl_11gR2> EXEC :search_string := 'sumer'
    
    PL/SQL procedure successfully completed.
    
    SCOTT@orcl_11gR2> COLUMN words FORMAT A15
    SCOTT@orcl_11gR2> SELECT SCORE(1), x.column_value words, t.test_col
      2  FROM   test_tab t,
      3           TABLE
      4             (get_words
      5            ('test_idx',
      6             t.ROWID,
      7             'FUZZY (?' || :search_string || ', 1, 5000, W)',
      8             t.test_col)) x
      9  WHERE  CONTAINS
     10             (t.test_col,
     11              'FUZZY (?' || :search_string || ', 1, 5000, W)',
     12              1) > 0
     13  ORDER  BY SCORE(1) DESC
     14  /
    
      SCORE(1) WORDS           TEST_COL
    ---------- --------------- ----------------------------------------------
            36 summer          warm summer
            12 summit          soon swimming is not possible as summit closes
    
    2 rows selected.
    
  • Is it Possible to do an exact search on this Site?

    I am trying to diagnose a problem with flashing of the menus and see if there is an incompatibility between OSX and some Firefox settings, but get results involving Flash.

    You can try using "search tips" found on this page https://discussions.apple.com/search

    You can also try an advanced search feature on this website: https://www.google.com/advanced_search

    Advanced tips

    Here are some other tips to make the most of your research. You can get fancy by entering in a way search terms and using special characters to limit or expand your search results:

    Action Description Example of
    Search for content that has certain words, but not necessarily all the words in the order This is the simplest search. Simply enter your search terms. This example finds the content with the words sync, iPhoneand iTunes. sync iPhone iTunes
    Search for content with some words in a certain order. To search for a specific phrase, place your phrase with quotation marks. Research will attempt to find the content with these words in order that their joint. He'll find any other content that contains only those words. ««Sync to iPhone»»
    Search for content with words that have letters in them.

    Use 'wildcards' to search for parts of words. Wildcards are special characters (*) that you include in your search terms...

    Multiple generic character represents a number any character. For example, to search for sync, synchronized, or synchronization, you can use this search.

    Sync *.
    You can also use the wildcard character in the middle of a term. Note: You cannot use a symbol {0} or {1} as the first character of a search.

    iP * d
    Search for content with similar terms that you enter

    "Fuzzy" searches return results that exactly match your search and the results terms that are nearby. For example, if you want to search for a word that is similar to the synchronization, add a tilde (~) to your search term. This research will correspond to terms such as sync, synchronizationand synck.

    Sync ~.
    Search for content in which some words are close to each other. To search for the words sync and the iPhone within five words of each other, enter a search like this phrase. "synchronize iPhone" ~ 5
    Boost content with some words up in the list of results Boosting a search term gives it more weight in the list of results. For example, if you search for iPhone iTunes sync you might get results of synchronization with iTunes, but not necessarily to sync your iPhone with iTunes. In this case, use a caret (^) and a number to tell the search engine for the word "iPhone" of heavier weight. sync iTunes iPhone ^ 4
    You can also push expressions that use a higher number, more to stimulate it. For example, if the stimulus a word in 3 still returns too many results, you can increase the value of the boost to 6.

    '"iPhone sync" ' ^ 3 iTunes

    "" sync iPhone"" ^ 6 iTunes

    Search content to this word OR that Word; this word AND that Word. Using Boolean operators, you can combine terms by using AND, +, OR, NOT and -. ALL uppercase to distinguish these terms of the normal words.

    The ORoperator links two terms and find content matching if or the other term exist in the content. You can also use two lines | instead of the word OR. To search the user tips that contain "iPhone sync" or "iTunes sync" use the query in the first two examples.

    OR is the default mode to search terms together, even if we let him. The third example is equivalent to the two best examples.

    "" sync iPhone"" GOLD "iTunes sync.

    ««Sync to iPhone»» | "iTunes sync.

    "" sync iPhone"" "iTunes sync.

    The operator AND , says that the search should return content in which all search terms are present. Note that you can also use the symbol & & in place of the word AND. Looking for advice about using that contain the "iPhone sync" and "iTunes sync" uses a search as in this example.

    "" synchronize iPhone' "AND"iTunes sync.

    '"synchronize iPhone' ' & & 'iTunes sync.

    You can get fancy by grouping Boolean expressions using parentheses. For example, to get results on the different types of synchronization, try this example.

    (iPhone iTunes music OR gold) AND sync Search of the content which is not having some words. The NOT operator excludes items that contain the term after NOT. You can also use the symbol ! in the place of the word NOT. To search for content that contains "iTunes sync" but not "sync music" uses something like in this example.

    "" sync iPhone"" NOT "iTunes sync.

    ""sync iPhone "! "iTunes sync.

    You must use the operator NOT with several terms. The example on the right will return no search results. NOT ""iPhone sync" Search for content in a particular place, such as the text of the topic or accessories. You can find something by looking at only part of the content. Type the name of the component contained by a colon after, then the text you want to search for. You can refine your search on the subject, body or tags. Here is an example that only searches for the word "sync" in the subject (title) of the content. Subject: sync Include special characters in your search phrase.

    To include some special characters (illustrated right) in a search expression, you use a special "escape" character that tells the search engine to treat the special characters like the others.

    + & - & | ! ( ) { } [ ] ^ " ~ * ? \ To escape these characters, put a backslash (\) before the character. For example, to search for some (1 + 1) - 2, that has special characters (,), + and -, use this query. \(1\+1\)\-2

    * These search tips have been copied from the link above.

  • Satellite M30X - fuzzy, blurry images

    I have a big problem with all the JPEGs and gif in Web browser (IE, Opera, Firefox etc.). I don't completely understand what is happening. All images, Office looks good and normal, but when I start to use the internet browser, images (JPEG, gif) on fuzzy search and terrible-very poor quality websites (FLASH animations is ok). I reinstalled my XP four times, updated everything I could. At first I thought that the cause is java or a plugin, but now I don't really know what to do. Same BIOS update did not help. Now, I use Windows 2003 and I still have this problem. My graphics card is ATI Radeon. In the past I had very similar problem, but I fixed it by reinstalling Opera Browser. I really need help. Sorry for the language, I hope someone will understand what I wrote.

    Hello

    Never heard of this kind of problem. If the images JPEG or gif is not downloaded completely sometimes images are blurred and incomplete. I'm confused about that because you have this problem with a maximum of different browsers.

    Also try changing the screen resolution. Your device should work with 1280 x 800 pixels.

  • Research using fuzzy context in multiple params

    Hi, my previous post is about research catserch and the context, I had advice of Roger and Barbara (both are extremely useful ~ thanks), I focus now by using the search from the context, but I had a problem of fuzzy search. I did some research, didnlt get very much, I think that it is a question for the expertise once again, sorry for the trouble and sincerely thank you for your time.

    ------------------------------
    Test data
    ----------------------------
    CREATE TABLE cust_catalog
    (id NUMBER (16),
    First name VARCHAR2 (80).
    name VARCHAR2 (80).
    Date of birth,
    type VARCHAR2 (10)
    )

    INSERT ALL
    INTO cust_catalog VALUES (1, 'John', 'Smith', to_date('10/03/1971','DD/MM/YYYY'), 'Mâle')
    INTO cust_catalog VALUES (2, 'Xavier', 'Johnson', to_date('05/07/1974','DD/MM/YYYY'), 'Female')
    INTO cust_catalog VALUES (3, 'David', 'Miles', to_date('16/10/1978','DD/MM/YYYY'), 'Mâle')
    INTO cust_catalog VALUES (4, 'Chris', 'Johnny', to_date('25/02/1976','DD/MM/YYYY'), 'Mâle')
    INTO cust_catalog VALUES (5, 'Jenny', 'The forge', to_date('28/11/1977','DD/MM/YYYY'), 'Female')
    INTO cust_catalog VALUES (6, 'Andy', 'Mil', to_date('16/08/1975','DD/MM/YYYY'), 'Mâle')
    INTO cust_catalog VALUES (7, 'Andrew', 'Smithe', to_date('15/12/1974','DD/MM/YYYY'), 'Mâle')
    INTO cust_catalog VALUES (8, 'John', 'Smith', to_date('07/11/1972','DD/MM/YYYY'), 'Mâle')
    INTO cust_catalog VALUES (9, 'William John', "Henson", to_date('04/01/1971','DD/MM/YYYY'), "Mâle")
    INTO cust_catalog VALUES (10, "Emma John", "Mil", to_date('06/04/1979','DD/MM/YYYY'), "Mâle")
    INTO cust_catalog VALUES (11, 'Jon', 'Smith', to_date('19/09/1977','DD/MM/YYYY'), 'Mâle')
    INTO cust_catalog VALUES (12, 'Jen', 'Smith', to_date('17/06/1978','DD/MM/YYYY'), 'Female')
    INTO cust_catalog VALUES (13, 'Chrissie', 'Smith', to_date('21/05/1975','DD/MM/YYYY'), 'Mâle')
    INTO cust_catalog VALUES (14, 'Yau', 'Smith', to_date('21/05/1975','DD/MM/YYYY'), 'Mâle')
    INTO cust_catalog VALUES (15, 'Chrisi', 'Smith', to_date('21/05/1975','DD/MM/YYYY'), 'Mâle')
    INTO cust_catalog VALUES (16, 'Johnny', 'Clark', to_date('21/05/1975','DD/MM/YYYY'), 'Mâle')
    INTO cust_catalog VALUES (17, "Bobbie", "Clarkson", to_date('21/05/1975','DD/MM/YYYY'), "Mâle")
    INTO cust_catalog VALUES (18, 'Bob', 'Clark', to_date('21/05/1975','DD/MM/YYYY'), 'Mâle')
    INTO cust_catalog VALUES (19, 'Jones', 'Smith', to_date('21/05/1975','DD/MM/YYYY'), 'Mâle')
    INTO cust_catalog VALUES (20, 'Johan', 'Smith', to_date('21/05/1975','DD/MM/YYYY'), 'Mâle')
    INTO cust_catalog VALUES (21, "Jean", "Smithie", to_date('21/05/1975','DD/MM/YYYY'), "Mâle")
    INTO cust_catalog VALUES (22, "Chris", "Smithey", to_date('21/05/1975','DD/MM/YYYY'), "Mâle")
    INTO cust_catalog VALUES (23, "Jean", "The forge", to_date('21/05/1975','DD/MM/YYYY'), "Mâle")
    INTO cust_catalog VALUES (24, "Chris", "Smithie", to_date('21/05/1975','DD/MM/YYYY'), "Mâle")
    INTO cust_catalog VALUES (25, 'John', 'Smithke', to_date('21/05/1975','DD/MM/YYYY'), 'Mâle')
    SELECT * FROM DUAL

    EXEC CTX_DDL. CREATE_PREFERENCE ("cust_lexer", "BASIC_LEXER");
    EXEC CTX_DDL. SET_ATTRIBUTE ("cust_lexer", "SKIPJOINS',", ".) » +-()/');
    EXEC CTX_DDL. Create_Preference ("cust_wildcard_pref", "BASIC_WORDLIST");
    CTX_DDL.set_attribute EXEC ('cust_wildcard_pref', 'prefix_index', 'YES');

    EXEC CTX_DDL. CREATE_PREFERENCE ("forename_datastore", "MULTI_COLUMN_DATASTORE");
    EXEC CTX_DDL. SET_ATTRIBUTE ("forename_datastore", "COLUMNS", "FirstName");

    EXEC CTX_DDL. CREATE_PREFERENCE ("surname_datastore", "MULTI_COLUMN_DATASTORE");
    EXEC CTX_DDL. SET_ATTRIBUTE ('surname_datastore', 'COLUMNS', 'name');

    EXEC CTX_DDL. CREATE_SECTION_GROUP ("your_sec", "BASIC_SECTION_GROUP");
    EXEC CTX_DDL. ADD_FIELD_SECTION ("your_sec", "first name", "first name", TRUE);
    EXEC CTX_DDL. ADD_FIELD_SECTION ('your_sec', 'name', 'name', TRUE);
    EXEC CTX_DDL. ADD_FIELD_SECTION ("your_sec", "birth", "date of birth", TRUE);

    CREATE INDEX forename_context_idx ON cust_catalog (first name) INDEXTYPE IS CTXSYS. FRAMEWORK
    FILTER BY genre
    PARAMETERS
    ("Forename_datastore of the DATA store
    SECTION your_sec GROUP
    LEXER cust_lexer
    List of WORDS cust_wildcard_pref')

    CREATE INDEX surname_context_idx ON cust_catalog (family name) INDEXTYPE IS CTXSYS. FRAMEWORK
    FILTER BY genre
    PARAMETERS
    ("Surname_datastore of the DATA store
    SECTION your_sec GROUP
    LEXER cust_lexer
    List of WORDS cust_wildcard_pref')


    -This work sql ok if not blurred
    SELECT * from cust_catalog
    WHERE CONTAINS (name, "Jean |") Chris ') > 0 AND CONTAINS (name,'smith |) Miles | MIL ') > 0

    -cleaning
    DROP TABLE cust_catalog;
    EXEC CTX_DDL. DROP_PREFERENCE ("cust_lexer");
    EXEC CTX_DDL. DROP_PREFERENCE ("cust_wildcard_pref");
    EXEC CTX_DDL. DROP_PREFERENCE ("forename_datastore");
    EXEC CTX_DDL. DROP_PREFERENCE ("surname_datastore");
    EXEC CTX_DDL. DROP_SECTION_GROUP ("your_sec");
    DROP INDEX forename_context_idx;
    DROP INDEX surname_context_idx;
    -------------------
    Questions here
    -------------------
    1. I have problem when I try to implement fuzzy search

    SELECT * from cust_catalog
    WHERE CONTAINS (name,' fuzzy ({john | chris}, 1, 100, weight)') > 0
    AND CONTAINS (name, ' smith | ") Miles | Milton) > 0

    2. am I also like to add on the beach of date of birth in the search, don't know what is the best way to do this, please comment below

    SELECT * from cust_catalog
    WHERE CONTAINS (name,' fuzzy ({john | chris}, 1, 100, weight)') > 0
    AND CONTAINS (name, ' smith | ") Miles | Milton) > 0
    AND date of birth BETWEEN TO_DATE('01/02/1970','DD/MM/YYYY') AND TO_DATE('11/07/1980','DD/MM/YYYY')

    3. There is a new line night employment insertion in this table, the reference to Roger that I need to create a trigger to update the index, this means to DROP and CREATE indexes for the forename_context_idx and the surname_context_idx every time when night work is running?

    Published by: Emily Robertson on November 14, 2012 13:02

    For maximum effectiveness, you must use an index and one contains the clause. You should put all your columns of text, such as the first name and family name and sex of your group of multi_column_datastore and the article. You can use the filter by and surlabasedesdonneesdufabricantduballast to add the column to the index. When you query a date using surlabasedesdonneesdufabricantduballast, the date must be in the format yyyy/mm/dd.

    You can create index on a column of text. Which column you create the index on must be the column that you are looking for and should be the column that is being updated in order to cause the text Oracle to recognize that there was an update.

    Fuzzy cannot be applied to a single term (Word), you will need to use a concatenation and replace to change something like 'fuzzy(word1|word2)' to ' fuzzy (word1) | Fuzzy (word2) ".

    In the following example, I used the table, lexer, and list of words you provided. I used a multi_column_datastore with all the columns of text three (surname, name and sex) and put all three of these columns in the section group. I've added a dummy column called any_column and created the index on this column, filtering by date of birth, using the data store, section group, lexer and wordlist, and adding sync (on validation), which will cause the index that you want to synchronize whenever a row is inserted or deleted, or that the index is created on the any_column is updated. Then I inserted the data to show that the synchronization is carried out. I then showed a query using all of the features you requested and explained the plan shows that it uses an index, press to access everything, so it's a very efficient query.

    You will still need to optimize or rebuild or delete and recreate periodically to reduce the fragmentation of the index caused by frequent synchronization.

    -script:

    -- table, lexer, and wordlist you provided:
    CREATE TABLE cust_catalog
      (id                NUMBER   (16),
       forename          VARCHAR2 (80),
       surname           VARCHAR2 (80),
       birthdate         DATE,
       gender            VARCHAR2 (10))
    /
    EXEC CTX_DDL.CREATE_PREFERENCE ('cust_lexer', 'BASIC_LEXER');
    EXEC CTX_DDL.SET_ATTRIBUTE ('cust_lexer', 'SKIPJOINS' , ',''."+-()/');
    EXEC CTX_DDL.Create_Preference ('cust_wildcard_pref', 'BASIC_WORDLIST');
    EXEC CTX_DDL.set_attribute ('cust_wildcard_pref', 'prefix_index', 'YES');
    
    -- revised datastore, section group, added column, and index:
    EXEC CTX_DDL.CREATE_PREFERENCE ('names_and_gender_datastore', 'MULTI_COLUMN_DATASTORE');
    EXEC CTX_DDL.SET_ATTRIBUTE ('names_and_gender_datastore', 'COLUMNS', 'forename, surname, gender');
    
    EXEC CTX_DDL.CREATE_SECTION_GROUP ('your_sec', 'BASIC_SECTION_GROUP');
    EXEC CTX_DDL.ADD_FIELD_SECTION ('your_sec', 'forename', 'forename', TRUE);
    EXEC CTX_DDL.ADD_FIELD_SECTION ('your_sec', 'surname', 'surname', TRUE);
    EXEC CTX_DDL.ADD_FIELD_SECTION ('your_sec', 'gender', 'gender', TRUE);
    
    ALTER TABLE cust_catalog ADD (any_column  VARCHAR2(1))
    /
    CREATE INDEX all_columns_context_idx
    ON cust_catalog (any_column)
    INDEXTYPE IS CTXSYS.CONTEXT
    FILTER BY birthdate
    PARAMETERS
      ('DATASTORE      names_and_gender_datastore
        SECTION GROUP  your_sec
        LEXER          cust_lexer
        WORDLIST       cust_wildcard_pref
        SYNC           (ON COMMIT)')
    /
    -- data you provided:
    INSERT ALL
    INTO cust_catalog VALUES (1, 'John', 'Smith', to_date('10/03/1971','DD/MM/YYYY'), 'Male', null)
    INTO cust_catalog VALUES (2, 'Emaily', 'Johnson', to_date('05/07/1974','DD/MM/YYYY'), 'Female', null)
    INTO cust_catalog VALUES (3, 'David', 'Miles', to_date('16/10/1978','DD/MM/YYYY'), 'Male', null)
    INTO cust_catalog VALUES (4, 'Chris', 'Johnny', to_date('25/02/1976','DD/MM/YYYY'), 'Male', null)
    INTO cust_catalog VALUES (5, 'Jenny', 'Smithy', to_date('28/11/1977','DD/MM/YYYY'), 'Female', null)
    INTO cust_catalog VALUES (6, 'Andy', 'Mil', to_date('16/08/1975','DD/MM/YYYY'), 'Male', null)
    INTO cust_catalog VALUES (7, 'Andrew', 'Smithe', to_date('15/12/1974','DD/MM/YYYY'), 'Male', null)
    INTO cust_catalog VALUES (8, 'John', 'Smith', to_date('07/11/1972','DD/MM/YYYY'), 'Male', null)
    INTO cust_catalog VALUES (9, 'Willam John', 'Henson', to_date('04/01/1971','DD/MM/YYYY'), 'Male', null)
    INTO cust_catalog VALUES (10, 'Emma John', 'Mil', to_date('06/04/1979','DD/MM/YYYY'), 'Male', null)
    INTO cust_catalog VALUES (11, 'Jon', 'Smith', to_date('19/09/1977','DD/MM/YYYY'), 'Male', null)
    INTO cust_catalog VALUES (12, 'Jen', 'Smith', to_date('17/06/1978','DD/MM/YYYY'), 'Female', null)
    INTO cust_catalog VALUES (13, 'Chrissie','Smith', to_date('21/05/1975','DD/MM/YYYY'), 'Male', null)
    INTO cust_catalog VALUES (14, 'Chrisy', 'Smith', to_date('21/05/1975','DD/MM/YYYY'), 'Male', null)
    INTO cust_catalog VALUES (15, 'Chrisi', 'Smith', to_date('21/05/1975','DD/MM/YYYY'), 'Male', null)
    INTO cust_catalog VALUES (16, 'Johnny', 'Clark', to_date('21/05/1975','DD/MM/YYYY'), 'Male', null)
    INTO cust_catalog VALUES (17, 'Bobbie', 'Clarkson', to_date('21/05/1975','DD/MM/YYYY'), 'Male', null)
    INTO cust_catalog VALUES (18, 'Bob', 'Clark', to_date('21/05/1975','DD/MM/YYYY'), 'Male', null)
    INTO cust_catalog VALUES (19, 'Jone', 'Smith', to_date('21/05/1975','DD/MM/YYYY'), 'Male', null)
    INTO cust_catalog VALUES (20, 'Johan', 'Smith', to_date('21/05/1975','DD/MM/YYYY'), 'Male', null)
    INTO cust_catalog VALUES (21, 'John', 'Smithie', to_date('21/05/1975','DD/MM/YYYY'), 'Male', null)
    INTO cust_catalog VALUES (22, 'Chris', 'Smithey', to_date('21/05/1975','DD/MM/YYYY'), 'Male', null)
    INTO cust_catalog VALUES (23, 'John', 'Smithy', to_date('21/05/1975','DD/MM/YYYY'), 'Male', null)
    INTO cust_catalog VALUES (24, 'Chris', 'Smithie', to_date('21/05/1975','DD/MM/YYYY'), 'Male', null)
    INTO cust_catalog VALUES (25, 'John', 'Smithke', to_date('21/05/1975','DD/MM/YYYY'), 'Male', null)
    SELECT * FROM DUAL
    /
    COMMIT
    /
    -- query:
    COLUMN forename FORMAT A10
    COLUMN surname  FORMAT A10
    SET AUTOTRACE ON EXPLAIN
    SELECT * FROM cust_catalog
    WHERE CONTAINS
            (any_column,
             '(FUZZY (' || REPLACE ('john|chris', '|', ', 1, 100, WEIGHT) | FUZZY (')
              || ', 1, 100, WEIGHT) WITHIN forename) AND
              (FUZZY (' || REPLACE ('smith|Miles|Mil', '|', ', 1, 100, WEIGHT) | FUZZY (')
              || ', 1, 100, WEIGHT) WITHIN surname) AND
              (SDATA (birthdate BETWEEN ''1970/01/02'' AND ''1980/11/07''))') > 0
    /
    SET AUTOTRACE OFF
    -- cleaning
    DROP TABLE cust_catalog;
    EXEC CTX_DDL.DROP_PREFERENCE ('cust_lexer');
    EXEC CTX_DDL.DROP_PREFERENCE ('cust_wildcard_pref');
    EXEC CTX_DDL.DROP_PREFERENCE ('names_and_gender_datastore');
    EXEC CTX_DDL.DROP_SECTION_GROUP ('your_sec');
    

    -execution:

    SCOTT@orcl_11gR2> -- table, lexer, and wordlist you provided:
    SCOTT@orcl_11gR2> CREATE TABLE cust_catalog
      2    (id            NUMBER   (16),
      3       forename       VARCHAR2 (80),
      4       surname        VARCHAR2 (80),
      5       birthdate       DATE,
      6       gender            VARCHAR2 (10))
      7  /
    
    Table created.
    
    SCOTT@orcl_11gR2> EXEC CTX_DDL.CREATE_PREFERENCE ('cust_lexer', 'BASIC_LEXER');
    
    PL/SQL procedure successfully completed.
    
    SCOTT@orcl_11gR2> EXEC CTX_DDL.SET_ATTRIBUTE ('cust_lexer', 'SKIPJOINS' , ',''."+-()/');
    
    PL/SQL procedure successfully completed.
    
    SCOTT@orcl_11gR2> EXEC CTX_DDL.Create_Preference ('cust_wildcard_pref', 'BASIC_WORDLIST');
    
    PL/SQL procedure successfully completed.
    
    SCOTT@orcl_11gR2> EXEC CTX_DDL.set_attribute ('cust_wildcard_pref', 'prefix_index', 'YES');
    
    PL/SQL procedure successfully completed.
    
    SCOTT@orcl_11gR2>
    SCOTT@orcl_11gR2> -- revised datastore, section group, added column, and index:
    SCOTT@orcl_11gR2> EXEC CTX_DDL.CREATE_PREFERENCE ('names_and_gender_datastore', 'MULTI_COLUMN_DATASTORE');
    
    PL/SQL procedure successfully completed.
    
    SCOTT@orcl_11gR2> EXEC CTX_DDL.SET_ATTRIBUTE ('names_and_gender_datastore', 'COLUMNS', 'forename, surname, gender');
    
    PL/SQL procedure successfully completed.
    
    SCOTT@orcl_11gR2>
    SCOTT@orcl_11gR2> EXEC CTX_DDL.CREATE_SECTION_GROUP ('your_sec', 'BASIC_SECTION_GROUP');
    
    PL/SQL procedure successfully completed.
    
    SCOTT@orcl_11gR2> EXEC CTX_DDL.ADD_FIELD_SECTION ('your_sec', 'forename', 'forename', TRUE);
    
    PL/SQL procedure successfully completed.
    
    SCOTT@orcl_11gR2> EXEC CTX_DDL.ADD_FIELD_SECTION ('your_sec', 'surname', 'surname', TRUE);
    
    PL/SQL procedure successfully completed.
    
    SCOTT@orcl_11gR2> EXEC CTX_DDL.ADD_FIELD_SECTION ('your_sec', 'gender', 'gender', TRUE);
    
    PL/SQL procedure successfully completed.
    
    SCOTT@orcl_11gR2>
    SCOTT@orcl_11gR2> ALTER TABLE cust_catalog ADD (any_column  VARCHAR2(1))
      2  /
    
    Table altered.
    
    SCOTT@orcl_11gR2> CREATE INDEX all_columns_context_idx
      2  ON cust_catalog (any_column)
      3  INDEXTYPE IS CTXSYS.CONTEXT
      4  FILTER BY birthdate
      5  PARAMETERS
      6    ('DATASTORE     names_and_gender_datastore
      7        SECTION GROUP     your_sec
      8        LEXER          cust_lexer
      9        WORDLIST     cust_wildcard_pref
     10        SYNC          (ON COMMIT)')
     11  /
    
    Index created.
    
    SCOTT@orcl_11gR2> -- data you provided:
    SCOTT@orcl_11gR2> INSERT ALL
      2  INTO cust_catalog VALUES (1, 'John', 'Smith', to_date('10/03/1971','DD/MM/YYYY'), 'Male', null)
      3  INTO cust_catalog VALUES (2, 'Emaily', 'Johnson', to_date('05/07/1974','DD/MM/YYYY'), 'Female', null)
      4  INTO cust_catalog VALUES (3, 'David', 'Miles', to_date('16/10/1978','DD/MM/YYYY'), 'Male', null)
      5  INTO cust_catalog VALUES (4, 'Chris', 'Johnny', to_date('25/02/1976','DD/MM/YYYY'), 'Male', null)
      6  INTO cust_catalog VALUES (5, 'Jenny', 'Smithy', to_date('28/11/1977','DD/MM/YYYY'), 'Female', null)
      7  INTO cust_catalog VALUES (6, 'Andy', 'Mil', to_date('16/08/1975','DD/MM/YYYY'), 'Male', null)
      8  INTO cust_catalog VALUES (7, 'Andrew', 'Smithe', to_date('15/12/1974','DD/MM/YYYY'), 'Male', null)
      9  INTO cust_catalog VALUES (8, 'John', 'Smith', to_date('07/11/1972','DD/MM/YYYY'), 'Male', null)
     10  INTO cust_catalog VALUES (9, 'Willam John', 'Henson', to_date('04/01/1971','DD/MM/YYYY'), 'Male', null)
     11  INTO cust_catalog VALUES (10, 'Emma John', 'Mil', to_date('06/04/1979','DD/MM/YYYY'), 'Male', null)
     12  INTO cust_catalog VALUES (11, 'Jon', 'Smith', to_date('19/09/1977','DD/MM/YYYY'), 'Male', null)
     13  INTO cust_catalog VALUES (12, 'Jen', 'Smith', to_date('17/06/1978','DD/MM/YYYY'), 'Female', null)
     14  INTO cust_catalog VALUES (13, 'Chrissie','Smith', to_date('21/05/1975','DD/MM/YYYY'), 'Male', null)
     15  INTO cust_catalog VALUES (14, 'Chrisy', 'Smith', to_date('21/05/1975','DD/MM/YYYY'), 'Male', null)
     16  INTO cust_catalog VALUES (15, 'Chrisi', 'Smith', to_date('21/05/1975','DD/MM/YYYY'), 'Male', null)
     17  INTO cust_catalog VALUES (16, 'Johnny', 'Clark', to_date('21/05/1975','DD/MM/YYYY'), 'Male', null)
     18  INTO cust_catalog VALUES (17, 'Bobbie', 'Clarkson', to_date('21/05/1975','DD/MM/YYYY'), 'Male', null)
     19  INTO cust_catalog VALUES (18, 'Bob', 'Clark', to_date('21/05/1975','DD/MM/YYYY'), 'Male', null)
     20  INTO cust_catalog VALUES (19, 'Jone', 'Smith', to_date('21/05/1975','DD/MM/YYYY'), 'Male', null)
     21  INTO cust_catalog VALUES (20, 'Johan', 'Smith', to_date('21/05/1975','DD/MM/YYYY'), 'Male', null)
     22  INTO cust_catalog VALUES (21, 'John', 'Smithie', to_date('21/05/1975','DD/MM/YYYY'), 'Male', null)
     23  INTO cust_catalog VALUES (22, 'Chris', 'Smithey', to_date('21/05/1975','DD/MM/YYYY'), 'Male', null)
     24  INTO cust_catalog VALUES (23, 'John', 'Smithy', to_date('21/05/1975','DD/MM/YYYY'), 'Male', null)
     25  INTO cust_catalog VALUES (24, 'Chris', 'Smithie', to_date('21/05/1975','DD/MM/YYYY'), 'Male', null)
     26  INTO cust_catalog VALUES (25, 'John', 'Smithke', to_date('21/05/1975','DD/MM/YYYY'), 'Male', null)
     27  SELECT * FROM DUAL
     28  /
    
    25 rows created.
    
    SCOTT@orcl_11gR2> COMMIT
      2  /
    
    Commit complete.
    
    SCOTT@orcl_11gR2> -- query:
    SCOTT@orcl_11gR2> COLUMN forename FORMAT A10
    SCOTT@orcl_11gR2> COLUMN surname  FORMAT A10
    SCOTT@orcl_11gR2> SET AUTOTRACE ON EXPLAIN
    SCOTT@orcl_11gR2> SELECT * FROM cust_catalog
      2  WHERE CONTAINS
      3            (any_column,
      4             '(FUZZY (' || REPLACE ('john|chris', '|', ', 1, 100, WEIGHT) | FUZZY (')
      5              || ', 1, 100, WEIGHT) WITHIN forename) AND
      6              (FUZZY (' || REPLACE ('smith|Miles|Mil', '|', ', 1, 100, WEIGHT) | FUZZY (')
      7              || ', 1, 100, WEIGHT) WITHIN surname) AND
      8              (SDATA (birthdate BETWEEN ''1970/01/02'' AND ''1980/11/07''))') > 0
      9  /
    
            ID FORENAME   SURNAME    BIRTHDATE GENDER     A
    ---------- ---------- ---------- --------- ---------- -
             1 John       Smith      10-MAR-71 Male
             8 John       Smith      07-NOV-72 Male
            10 Emma John  Mil        06-APR-79 Male
            11 Jon        Smith      19-SEP-77 Male
            13 Chrissie   Smith      21-MAY-75 Male
            14 Chrisy     Smith      21-MAY-75 Male
            15 Chrisi     Smith      21-MAY-75 Male
            19 Jone       Smith      21-MAY-75 Male
            20 Johan      Smith      21-MAY-75 Male
            21 John       Smithie    21-MAY-75 Male
            22 Chris      Smithey    21-MAY-75 Male
            23 John       Smithy     21-MAY-75 Male
            24 Chris      Smithie    21-MAY-75 Male
            25 John       Smithke    21-MAY-75 Male
    
    14 rows selected.
    
    Execution Plan
    ----------------------------------------------------------
    Plan hash value: 1894062579
    
    -------------------------------------------------------------------------------------------------------
    | Id  | Operation                   | Name                    | Rows  | Bytes | Cost (%CPU)| Time     |
    -------------------------------------------------------------------------------------------------------
    |   0 | SELECT STATEMENT            |                         |     1 |   127 |     4   (0)| 00:00:01 |
    |   1 |  TABLE ACCESS BY INDEX ROWID| CUST_CATALOG            |     1 |   127 |     4   (0)| 00:00:01 |
    |*  2 |   DOMAIN INDEX              | ALL_COLUMNS_CONTEXT_IDX |       |       |     4   (0)| 00:00:01 |
    -------------------------------------------------------------------------------------------------------
    
    Predicate Information (identified by operation id):
    ---------------------------------------------------
    
       2 - access("CTXSYS"."CONTAINS"("ANY_COLUMN",'(FUZZY (john, 1, 100, WEIGHT) | FUZZY (chris,
                  1, 100, WEIGHT) WITHIN forename) AND           (FUZZY (smith, 1, 100, WEIGHT) | FUZZY (Miles,
                  1, 100, WEIGHT) | FUZZY (Mil, 1, 100, WEIGHT) WITHIN surname) AND           (SDATA (birthdate
                  BETWEEN ''1970/01/02'' AND ''1980/11/07''))')>0)
    
    Note
    -----
       - dynamic sampling used for this statement (level=2)
    
    SCOTT@orcl_11gR2> SET AUTOTRACE OFF
    SCOTT@orcl_11gR2> -- cleaning
    SCOTT@orcl_11gR2> DROP TABLE cust_catalog;
    
    Table dropped.
    
    SCOTT@orcl_11gR2> EXEC CTX_DDL.DROP_PREFERENCE ('cust_lexer');
    
    PL/SQL procedure successfully completed.
    
    SCOTT@orcl_11gR2> EXEC CTX_DDL.DROP_PREFERENCE ('cust_wildcard_pref');
    
    PL/SQL procedure successfully completed.
    
    SCOTT@orcl_11gR2> EXEC CTX_DDL.DROP_PREFERENCE ('names_and_gender_datastore');
    
    PL/SQL procedure successfully completed.
    
    SCOTT@orcl_11gR2> EXEC CTX_DDL.DROP_SECTION_GROUP ('your_sec');
    
    PL/SQL procedure successfully completed.
    
  • Need to search with correct spelling typo snacks

    Hello

    If I am searching with a wrong spelling, it must ask (or) check with the correct spelling. Say, if the user performs a search for the keyword "serch", to look for the word "search".

    This will make it possible to link the search words with the Thesaurus built instead of setting the spelling of all the words.

    An example of the foregoing will be more useful.

    Thanks in advance.

    Oracle doesn't have a built-in spellchecker or similar spellings recovery method directly from the thesaurus. If you want a spell checker, then you must either get a dictionary that you can compare to or find a way to use a spellchecker online. If you get a dictionary, then you'll do something like creating a context on the dictionary and using fuzzy index to find possible spellings of correct based on a bad. If you use a spell checker online, he will do something similar. If using a spell checker in line and you wait until it is always available to your application, you should ensure that you have purchased a subscription to this service. In both cases, the final results are substantially the same as if you just do a fuzzy search in a first time and save a lot of trouble and further treatment, which can take some time. I have provided a few examples below for comparison. I first demonstrated using a dictionary. I walked just two rows, but you want to download a whole dictionary of somewhere, probably in text format, then use SQL * Loader to load it into a table. Then I have shown by using an online service, but not one who subscribes to that you can count on a method. Finally, I made a simple query using and blurred that renders the same as other methods, without all the extra code and treatment. So, I hope you can see that everything you need is probably a fuzzy search. In the examples I've provided, I used functions to concatenate all the suggested correct spellings with the | symbol, meaning the Oracle text and surrounded by each group in parentheses. You can use additional criteria to narrow the possibilities.

    SCOTT@orcl_11gR2> -- test environment:
    SCOTT@orcl_11gR2> create table test_tab
      2    (test_col  varchar2 (60))
      3  /
    
    Table created.
    
    SCOTT@orcl_11gR2> insert all
      2  into test_tab (test_col) values ('search for the rabbit')
      3  into test_tab (test_col) values ('some other data')
      4  select * from dual
      5  /
    
    2 rows created.
    
    SCOTT@orcl_11gR2> create index test_idx
      2  on test_tab (test_col)
      3  indextype is ctxsys.context
      4  /
    
    Index created.
    
    SCOTT@orcl_11gR2> -- method using dictionary you obtain:
    SCOTT@orcl_11gR2> create table test_dict
      2    (test_word  varchar2(30))
      3  /
    
    Table created.
    
    SCOTT@orcl_11gR2> insert all
      2  into test_dict values ('rabbit')
      3  into test_dict values ('search')
      4  select * from dual
      5  /
    
    2 rows created.
    
    SCOTT@orcl_11gR2> create index test_dict_idx
      2  on test_dict (test_word)
      3  indextype is ctxsys.context
      4  /
    
    Index created.
    
    SCOTT@orcl_11gR2> create or replace function dict_check
      2    (p_word in varchar2)
      3    return       varchar2
      4  as
      5    v_words       varchar2 (2000);
      6  begin
      7    for r in
      8        (select test_word
      9         from      test_dict
     10         where  contains (test_word, '?' || p_word) > 0
     11         union
     12         select p_word
     13         from      dual)
     14    loop
     15        v_words := v_words || '|' || r.test_word;
     16    end loop;
     17    return '(' || ltrim (v_words, '|') || ')';
     18  end;
     19  /
    
    Function created.
    
    SCOTT@orcl_11gR2> select dict_check ('serch') from dual
      2  /
    
    DICT_CHECK('SERCH')
    --------------------------------------------------------------------------------
    (search|serch)
    
    1 row selected.
    
    SCOTT@orcl_11gR2> select dict_check ('rabit') from dual
      2  /
    
    DICT_CHECK('RABIT')
    --------------------------------------------------------------------------------
    (rabbit|rabit)
    
    1 row selected.
    
    SCOTT@orcl_11gR2> select * from test_tab
      2  where  contains
      3             (test_col,
      4              dict_check ('serch')
      5              || ' and ' ||
      6              dict_check ('rabbit')) > 0
      7  /
    
    TEST_COL
    ------------------------------------------------------------
    search for the rabbit
    
    1 row selected.
    
    SCOTT@orcl_11gR2> -- method using online spell checker:
    SCOTT@orcl_11gR2> create or replace function spell_check
      2    (p_word in varchar2)
      3    return       varchar2
      4  as
      5    l_res     clob;
      6    l_cnt     varchar2(10);
      7    l_sc     varchar2(10);
      8    l_words     varchar2(2000);
      9  begin
     10    l_res := httpuritype
     11              ('http://ws.cdyne.com/SpellChecker/check.asmx/CheckTextBodyV2?'
     12               || utl_url.escape('BodyText=' || p_word)).getclob();
     13    l_cnt := XmlType(l_res).extract
     14              ('/DocumentSummary/MisspelledWordCount/text()',
     15               'xmlns="http://ws.cdyne.com/').getStringVal();
     16    if l_cnt > 0 then
     17        l_sc := XmlType(l_res).extract
     18               ('/DocumentSummary/MisspelledWord['||1||']/SuggestionCount/text()',
     19                'xmlns="http://ws.cdyne.com/').getStringVal();
     20        for i in 1 .. l_sc loop
     21          l_words := l_words || '|' ||
     22                  XmlType(l_res).extract
     23                 ('/DocumentSummary/MisspelledWord['||1||']/Suggestions['||i||']/text()',
     24                  'xmlns="http://ws.cdyne.com/').getStringVal();
     25        end loop;
     26    else
     27        l_words := p_word;
     28    end if;
     29    return '(' || ltrim (l_words, '|') || ')';
     30  end spell_check;
     31  /
    
    Function created.
    
    SCOTT@orcl_11gR2> select spell_check ('serch') from dual
      2  /
    
    SPELL_CHECK('SERCH')
    --------------------------------------------------------------------------------
    (search|such|perch|sch|sash|searches|Zach|searched|searcher|research|Sorcha|sush
    i|searchers|searching|searcher's|sashay|Sacha|sushis|sashed|sashes|sash&apo
    s;s|researcher|sashing|sushi's|sashays)
    
    1 row selected.
    
    SCOTT@orcl_11gR2> select spell_check ('rabit') from dual
      2  /
    
    SPELL_CHECK('RABIT')
    --------------------------------------------------------------------------------
    (rabbit|habit|robot|rabid|rabbet|rabis|rebid|rubout|Rabat|rabbits|reboot|rowboat
    |rabbiter|robots|rubato|Robt|rabbited|rebate|rabbit's|rabidly|rabbets|ribbe
    d|rubbed|rubatos|robbed)
    
    1 row selected.
    
    SCOTT@orcl_11gR2> select * from test_tab
      2  where  contains
      3             (test_col,
      4              spell_check ('serch')
      5              || ' and ' ||
      6              spell_check ('rabbit')) > 0
      7  /
    
    TEST_COL
    ------------------------------------------------------------
    search for the rabbit
    
    1 row selected.
    
    SCOTT@orcl_11gR2> -- fuzzy search:
    SCOTT@orcl_11gR2> select * from test_tab
      2  where  contains
      3             (test_col,
      4              '?serch and ?rabbit') > 0
      5  /
    
    TEST_COL
    ------------------------------------------------------------
    search for the rabbit
    
    1 row selected.
    
    SCOTT@orcl_11gR2>
    
  • In Fuzzy text box

    Hi all

    When using the text boxes in Captivate 2 (called "Textbeschriftung" in my German version) with the model/design [transparent] produces a fuzzy search text in the exported sequence. It looks a bit like in Flash when you use anti-aliasing.
    When I use for example the model normal "red adobe", the text retains crisp and clear.
    Someone has a tip how to get net text with the transparent text box?

    Thank you
    Holger

    Hello Mark,

    very well, thank you very much!

    Best regards, Holger

Maybe you are looking for