Text Oracle (type index CTXCAT) index does not not with wild-card leader

Hi Experts,

We are on Oracle 11.2.0.2 on Solaris 10 and I implemented the Oracle text as in the example below:
CREATE TABLE TEST_USER
(
  FIRST_NAME  VARCHAR2(64 CHAR)                 NOT NULL,
  LAST_NAME   VARCHAR2(64 CHAR)                 NOT NULL
);


CREATE INDEX TEST_USER_IDX3 ON TEST_USER
(FIRST_NAME)
INDEXTYPE IS CTXSYS.CTXCAT
PARAMETERS('LEXER cust_lexer');


CREATE INDEX TEST_USER_IDX4 ON TEST_USER
(LAST_NAME)
INDEXTYPE IS CTXSYS.CTXCAT
PARAMETERS('LEXER cust_lexer');

Dont worry about the cust_lexer, it is for diacritical search and it is not relevant to this question so I am not copying the code for the preference I created etc.
Now I have a row of data in the table with first_name column as Supervisor. If I run the below sql, it gives output:

SELECT *
  FROM test_user
 WHERE catsearch (first_name, 'Supervisor', NULL) > 0;

FIRST_NAME                     LAST_NAME
------------------------------ ------------------------------
Supervisor                     upervisor

--even the below sql with wild card (*) at the end works fine...
SQL> SELECT *
  2    FROM test_user
  3   WHERE catsearch (first_name, 'Super*', NULL) > 0;

FIRST_NAME                     LAST_NAME
------------------------------ ------------------------------
Supervisor                     upervisor


However the below sql queries doesn't give any output, though they should return the same row as above!

SQL> SELECT *
  2    FROM test_user
  3   WHERE catsearch (first_name, '*visor', NULL) > 0;

no rows selected


SQL> SELECT *
  2    FROM test_user
  3   WHERE catsearch (first_name, '*vis*', NULL) > 0;

no rows selected
I've already implemented it and now faced with this question that queries do not work as expected - can anyone suggest what we can do for this problem?

Thank you

Published by: orausern on January 16, 2013 10:59

Published by: orausern on 16 January 2013 11:00

Published by: orausern on 16 January 2013 11:07

When you create a ctxcat index, it creates different tables index field. You can query like this:

select dr$token from dr$TEST_USER_IDX3$i;

... to see which tokens are created by the indexing. In your case, I think that you will find just the word 'controller' in the name, is that you can go. This documentation gives to think than catsearch and wildcards don't mix, unless you use the query template feature.

I'm more familiar with CTXSYS. CONTEXT clues, though:

drop index TEST_USER_IDX3;

SQL> CREATE INDEX TEST_USER_IDX3 ON TEST_USER
  2  (FIRST_NAME)
  3  INDEXTYPE IS CTXSYS.CONTEXT;

SQL> select * from test_user where contains (first_name, '%vis%')>0;

FIRST_NAME                                                       LAST_NAME
---------------------------------------------------------------- -----------
Supervisor                                                       Ubervisor 

Anyway, since I've linked the document, I think you might need to check the query patterns.

There's a specific forum Oracle Text here, however, and if you can get Barbara Boehmer to read your question there, she'll probably have a definitive answer for you.

PS: She may already have provided in Re: wildcard search, on which she stated that "since catsearch does not support wildcards left you need context...» ».

Tags: Database

Similar Questions

  • Why B * TREE index does not work when ask explicit type conversion.

    What is the job of back-end of B * column indexed with numeric type data when to perform explicit Conversion in the WHERE clause of number of Char.

    Basically my question is why index does not work when applying both sides TO_CHAR conversion in where clause?

    Let's say we have a table with 1 million rows

    ------------------------------------------------------------------------------

    Create Table T (collar number);

    -The unique index on the column.

    CREATE A UNIQUE IDX_T ON T (CSA COL) INDEX.

    -Insert the statement on the table with million lines

    ------------------------------------------------------------------------------

    Begin

    For I In 1.1000000 loop

    Insert Into Values T (I);

    End loop;

    COMMIT;

    End;

    ------------------------------------------------------------------------------

    We have different situations using

    explain plan for select col from t where col =?;

    SELECT * FROM TABLE (DBMS_XPLAN. DISPLAY);

    Case 1.  Where COL = 50555;

    ---------------------------------------------------------------------------

    | ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time |

    ---------------------------------------------------------------------------

    0 | SELECT STATEMENT |       |     1.    13.     0 (0) | 00:00:01 |

    1.  INDEX UNIQUE SCAN | IDX_T |     1.    13.     0 (0) | 00:00:01 |

    ---------------------------------------------------------------------------

    Information of predicates (identified by the operation identity card):

    ---------------------------------------------------

    1 - access ("COL" = 50555)

    Case 2.  Where COL = '50555';

    ---------------------------------------------------------------------------

    | ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time |

    ---------------------------------------------------------------------------

    0 | SELECT STATEMENT |       |     1.    13.     0 (0) | 00:00:01 |

    1.  INDEX UNIQUE SCAN | IDX_T |     1.    13.     0 (0) | 00:00:01 |

    ---------------------------------------------------------------------------

    Information of predicates (identified by the operation identity card):

    ---------------------------------------------------

    1 - access ("COL" = 50555)

    Case 3.  Where TO_CHAR (COL) = 50555;

    --------------------------------------------------------------------------

    | ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time |

    --------------------------------------------------------------------------

    0 | SELECT STATEMENT |      |     1.    13.   470 (6) | 00:00:06 |

    1.  TABLE ACCESS FULL | T    |     1.    13.   470 (6) | 00:00:06 |

    --------------------------------------------------------------------------

    Information of predicates (identified by the operation identity card):

    ---------------------------------------------------

    1 - filter (TO_NUMBER (TO_CHAR ("COL")) = 50555)

    Case 4. Where TO_CHAR (COL) = '50555';

    --------------------------------------------------------------------------

    | ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time |

    --------------------------------------------------------------------------

    0 | SELECT STATEMENT |      |     1.    13.   463 (5) | 00:00:06 |

    1.  TABLE ACCESS FULL | T    |     1.    13.   463 (5) | 00:00:06 |

    --------------------------------------------------------------------------

    Information of predicates (identified by the operation identity card):

    ---------------------------------------------------

    1 - filter (TO_CHAR ("COL") = '50555')

    Why the access descriptor became predicate to filter in case 3 and 4?

    Please, help me understand.

    ACCESS (Index Scan) - Oracle tries to use an index one try to access a table row that they are interested.

    FILTER (full table scan) - Oracle has no any tool to directly get to the table of ranks it is interested in, so it must pass all the lines and then filter the rows that match the main condition.

  • Vista indexing does not

    Instant Search does not work in outlook 2007 (SP2), when activated windows (vista Business Service Pack 1 32 bit) indexing says "indexing does not work" and only forward tab is enabled.

    Also tried outlook--> tools--> instant search--> search options--> to check the boxes in 'research' and 'indexing' after pressing 'OK', he said "a problem has been experienced. trying to change which data files to index Some of these changes may not have been saved. »

    When tried to run the Windows search (already in automatic mode) service, it says "Windows Search service on Local computer started and then stopped. Some services stop automatically if they are not in use by other services or programs. »

    Hello RRAIK,

    Thank you for visiting the website of Microsoft Windows Vista Community.

    Try the following steps:

    OPTION 1:

    How to disable or enable the index service

    NOTE

    This will enable or disable the Index for Vista completely. This will not affect the regular nonindexed Vista search function.

    1. open the Start Menu.

    2. the area of the white line (search) type services and press ENTER.

    3. click on continue in the UAC prompt.

    4. scroll down and right-click on Windows Search.

    5. click on properties.

    6. to turn off the Index-

    (A) click on the Stop button.

    (B) next to startup type, click the arrow on the menu drop-down and click on disable.

    (C) click on apply.

    (D) proceed to step 8.

    7. to activate the Index-

    One) next to startup type:, click the menu drop-down and click Automatic.

    (B) click on apply.

    (C) click the Start button.

    NOTE: If the search service Windows does not start, then let it set on automatic and see: how to fix startup error for Windows Search Service to activate the Index in Vista

    8. click on OK.

    9. close the Service window.

    SECOND OPTION:

    How to enable or disable the Index for a drive

    NOTE

    This will be only enable or disable the Index for the selected drive.

    1. open the Start Menu.

    2. click on computer.

    3 right-click on the hard drive, to enable or disable the Index, and then click Properties.

    4. to disable the Index-

    (A) uncheck Index this drive to speed up the search for box.

    (B) proceed to step 6.

    5. to activate the Index-

    (A) check the index of this player for a search box.

    NOTE: Step 7 in the section ONE OPTION above should be defined activated to operate at.

    6. click on apply.

    7. Select (dot) apply the changes to the drive, subfolders, and files.

    8. click on OK.

    9. click on continue in the window of access denied.

    10. click the button ignore all error application of attributes window.

    NOTE: Vista's not any attempt to mess with the boot files. This is why you get this error and must select ignore all to skip the editing of these files.

    11. This can take a long time to complete depending on the size of your hard drive, then sit you, kick your feet up and relax a bit.

    12. When finished, click OK to close the drive properties window.

    This should solve your problem.

    Let us know if these steps solve your problem.  I hope the information is useful.

    Kind regards

    Anthony
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • 'Windows 7 search' does not & "indexing does not work" (on libraries)

    'Windows 7 search' does not & "indexing does not work" (on the libraries).

    How can I correct (get indexing and searching for work) research one of the features of pride & joy MS on Librearies?

    The Indexing Options Control Panel indicates "Indexing does not work" & the library places panel shows Unresponsive.

    The service started Windows search and then stopped.

    Look forward to any suggestions

    Ed.

    Hello EdJarvis,

    Thanks for the return of the response.  Below is a link with the same problem reported.  You did some of the steps listed to try, but there are others listed.

    Windows Search service does not (Windows 7)

    http://answers.Microsoft.com/en-us/Windows/Forum/Windows_7-performance/Windows-Search-service-is-not-running-window-7/3d7858e1-c3d3-4149-9EC1-640f319c0137

    Please let us know status.

  • Assistant smart index does not appear

    Hello!
    I am fighting a serious problem while developing RoboHelp office x 3.
    Assistant smart index does not appear anywhere.
    Don't ~ ~, nothing associated with Smart indext Wizard does not appear in the program.
    Have I not bad installation?
    Someone help me.

    Hello dsfda and welcome to our community

    Using RoboHelp for Word or RoboHelp HTTML? Assuming that RoboHelp HTML, have you tried looking at the Tools menu?

    If you use RoboHelp for Word, I'll have to rely on a person who uses this product to answer.

    See you soon... Rick

  • Oracle Sql developer 2.1 does not work

    Hello
    Oracle Sql developer 2.1 does not work on my machine (Windows server 2003 pack 2 service) but works on xp and vista. On the other hand oracle datamodeller works very well.

    can someone help me?

    Thank you

    Who must have worked also. Do you all not basic ASCII characters in the path?

    K.

  • TS15g067cl laptop: memory card reader does not recognize the card

    The card reader does not recognize the cards.  It does not have a drive location (example: f drive).   This makes it impossible to veiw the files or photos on any (I tried six different) of my SanDisk SD cards.  I can't find anywhere to downlod corrected card rhe read updates update drivers or BIOS for my system.   I just bought this computer 1 week ago and do not understand why I read in the forums about driver issues of card reader for the last year.  Windows 8.1 has been out for some time.  Why HP would sell these computers without updating the software to make them work as they should?

    Thanks for the info.  Disk management does not show the drive.  The problem was resolved after reloading BIOS, as suggested in another post.

  • ASUS Tablet does not recognize SD card

    My got transform TF 101 does not recognize micro SD cards. How can I solve this problem?

    Hi, Odiec,

    You have the software express gate on the system?  Update of the software

    http://support.ASUS.com/search/KDetail.aspx?SLanguage=en&no=80E22F30-B3FF-1DFE-9DFB-5CED63C0B176&t=2

    Put the card in the slot

    Restart the computer

    Now the system does not recognize the card?

    You formatted the card?
    https://www.sdcard.org/downloads/formatter_3/

  • HP Photosmart 5520 does not accept SD card. Help

    I am trying to scan photos of all-in-one HP Photosmart 5520 for a SD memory card.  My printer does not accept my card.

    What is the correct way to insert the card?  Is a required adapter?

    Hi @cg51 ,

    Thank you for visiting the Forums HP's Support and welcome. I looked in your question about your printer HP Photosmart 5520 and who need to scan to a memory card. The best way to do that is located here in your manual on page 23. It gives you an instructions step by step.

    Hope that helps you to analyze.

    Thank you.

  • Vista does not recognize video card

    I recently moved, and after I put my computer my monitor is not a signal. I plugged my monitor on the main port and it came. My computer does not recognize the card in the Device Manager. I opened it and inspected the map for all the Visual problems and plugged it upward and noticed that the fan on the graphics card not working. I then did a full restore of the system, reinstalled the installation CD supplied with the card after you disable the onboard and restarted my computer. Still does not recognize the card and after restarting it on my integrated card. Then, I went into the BIOS and selected PCI-E as my first. So... im out of ideas here, if the fan is still ongoing is not the card still work? I don't have another office to plug it in. Is there another way to know if the card works? Why it can't recognize the graphics card which was working fine before the move? On a side note, the computer was unplugged for 2 weeks during this time, but I don't know why this could be a problem.

    IM using Vista 32 bit.

    Hi Myriam.
    Thank you for visiting the Microsoft Answers forum
    If the fan on the card does not is an indicator that the card is not powered, so the only way to test it is to plug it into another machine to see if the motherboard is not giving power or is the card that is bad. You can also try to plug a PCI-E device and see if it has power.

    You have all the cables connected directly from the power supply to the graphics card?

    Martin
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think

  • Photoshop does not recognize my card 960graphic GeForce GTX

    Hello

    I need help on my graphics (GTX 960). Everything's fine (yesterday until I update an extension called FlatIcon (Fi)). I used it for a long time and nothing wrong. Now, Photoshop does not recognize my card. I updated the driver NVIDIA, photoshop set to run as a high performance with NVIDIA Control Panel, remove FlatIcon extension, reset prerefences (Alt + Ctrl + Shift), increase the size of the Scratch drive (200 GB free now), but without hope. I hope someone can help me solve this problem, thank you 1 million.

    Wood

    Can you have a think when this started.  Could he have when you went from CC2014 to CC2015 for example?  CC2015 makes the best use of the GPU acceleration and seems to be more picky about the material.

    You are not able to check the use of GPU acceleration at all, or simply not advanced drawing mode?

    What driver version are you using?

    FWIIW, my experience with a GTX970 was that I could only use Basic Drawing mode in CC2014, but it suddenly allowed me to set the mode advanced for awhile and then changed me back to the basic mode when I upgraded to CC2015

    353,3 get mode advanced for a short period, but it passed without known reason.

    Displays how do you drive?

    You have only a GTX960?

  • Oracle text index does not return the expected results.

    Hello

    My project requires a generic search on 5 different columns and all the VARCHAR2 data type.
    As performance is very slow with AS % search, I try to use for the multi_column_datastore that is recommended for this.

    Here's what I did.

    1 - Create table.
    CREATE TABLE BILLING_SCHEMA.NAMES_TABLE ( 
        ID                  NUMBER(9,0) NOT NULL,
        ENTITY_NUMBER         VARCHAR2(30) NOT NULL,
        GIVEN_NAMES         VARCHAR2(50) NULL,
        SURNAME             VARCHAR2(30) NULL,
        ORGANISATION_NAME     VARCHAR2(60) NULL,
        DISPLAY_NAME        VARCHAR2(100) NULL 
        )
    /
    
     
    My search must be made on the columns ENTITY_NUMBER, GIVEN_NAMES, surname, ORGANISATION_NAME and DISPLAY_NAME.

    2. - insert values into the table
    INSERT INTO NAMES_TABLE VALUES(1, 'GH', NULL, NULL, NULL, 'GROUP OF HOSPITAL')
    /
    INSERT INTO NAMES_TABLE VALUES(2, 'DH', NULL, NULL, NULL, 'DEPARTMENT OF HEALTH')
    /
    INSERT INTO NAMES_TABLE VALUES(3, 'REC', NULL, NULL, NULL, 'DEBTOR FOR RECEIPTS')
    /
    INSERT INTO NAMES_TABLE VALUES(4, 'UN_REC', NULL, NULL, NULL, 'DEBTOR FOR UNMATCHED RECEIPTS')
    /
    INSERT INTO NAMES_TABLE VALUES(5, 'SAM_FUND', NULL, NULL, NULL, 'THE S FUND')
    /
    
     
    3 - create context multi_column_datastore index
    BEGIN
    CTX_DDL.CREATE_PREFERENCE('NAMES_TABLE_MULTI', 'MULTI_COLUMN_DATASTORE');
    CTX_DDL.SET_ATTRIBUTE('NAMES_TABLE_MULTI', 'COLUMNS', 'ENTITY_NUMBER, GIVEN_NAMES, SURNAME, ORGANISATION_NAME, DISPLAY_NAME');
    END;
    
    CREATE INDEX NAMES_TABLE_IDX
    ON NAMES_TABLE(ENTITY_NUMBER)
    INDEXTYPE IS   CTXSYS.CONTEXT
    PARAMETERS ('DATASTORE NAMES_TABLE_MULTI')
    
     
    4 - create the trigger that should update the column ENTITY_NUMBER if everything is inserted/updated
    CREATE OR REPLACE TRIGGER NAMES_TABLE_TRIGGER
    BEFORE INSERT OR UPDATE OF GIVEN_NAMES, SURNAME, ORGANISATION_NAME, DISPLAY_NAME  ON NAMES_TABLE
    FOR EACH ROW
    BEGIN
      :NEW.ENTITY_NUMBER := :NEW.ENTITY_NUMBER;
    END
     
    5. the search query
    SELECT *
    FROM NAMES_TABLE
    WHERE  CONTAINS(ENTITY_NUMBER,'%TH%') > 0
     
    I am so very confused here because the result returned is only
    ID     ENTITY_NUMBER     GIVEN_NAMES     SURNAME     ORGANISATION_NAME     DISPLAY_NAME         
     2      DH                  (null)        (null)         (null)          DEPARTMENT OF HEALTH 
     
    When I wait for him that the 5th inserted record is returned too as it contains "THE S FUND" that begins with "TH".

    When I use the search string '% %' and %, no results are returned, although I expect at least two records in each case.

    I would appreciate help with this.

    Thanks in advance,
    Marilyn

    Published by: user5615580 on 08/03/2011 21:35

    Published by: user5615580 on 08/04/2011 16:33
  • indexing does not look in the files as "file".

    I have hundreds of files without extension, and indexing, you won't find any content files.  In the 'Type' column, it shows that 'file '.  These are text files, I can open it in Wordpad or Notepad.  If I do a "save under", or rename the file as a .txt file, then I can search in content

    I have already entered the Indexing Options and went to advanced, then File Types.  I added a new extension of ". =", "." and a white.  Also chose "Index Properties and file contents," then re-indexed.  It still does not work.  If I search in the search, "file type:" or "type: =." she'll find by type name, however try to add the contents of the files the search does not find anything.

    Won't try indexing indexing a file without an extension because of the ambiguity of not knowing if it will have the same format as the others and has been the main causes of accidents, performance issues and indexing of corruption.  Basically because the input format cannot be guaranteed or predict reliably, it does.

  • Indexer does not

    Hi all

    I installed 10 g 3 of the Complutense University of MADRID... Installed perfectly, an indexer, but does not work very well.
    Cyecle of automatic update works fine. Collection rebuild cycle does not work. Its like shoing indexing error interrupted 05/18/10 12:47. Impossible to index the metadata only. This may indicate that the collection is corrupt. Abandoned indexing.

    Please help me solve this problem.


    Kind regards
    Vijay T

    Hello

    Your content server running DB Fulltext search engine or Oracle text search? If this is the case then cross Note: 748186.1 which describes the steps to work around the problem. Let me know how it goes.

    Thank you
    Srinath

  • Windows Indexing does not.

    When I go in indexing options, it says be indexing is not running.

    I can't edit (don't give me the option) and when I try to rebuild, it does nothing.

    Have also sought to "Turing Windows has or not" there is no indexing functionality on this menu.

    Hello SamJ969,

    Please, try the steps below, to see if you can enable indexing.

    To disable or enable the service, run services.msc """or directly in the start menu or via the Run dialog box." Once loaded, scroll down the list of services, right-click on Windows Search and then click Properties.  You will have then a pop window, confirm under "Startup Type" confirms that it is set to "automatic (delayed start).  Then select apply.

    Please let us know status.

Maybe you are looking for