I need to provide an argument!

I'm sorry I'm having a lot of questions, but I appreciate all the great help I've been getting to date.
Here's one I've just been thrown. If I do a CONTAINS search for 'dog', matches will include 'dog collar', 'dog star', 'hot dog' and so on, as well as 'cat and dog', no matter how I 'phrase' the SQL:
SQL> select * from texttst where contains (col1,'dog')>0;
COL1
hot dog
dog collar
dog and cat
SQL> select * from texttst where contains (col1,'{dog}')>0;
COL1
hot dog
dog collar
dog and cat
SQL> select * from texttst where contains (col1,'{"dog"}')>0;
COL1
hot dog
dog collar
dog and catMy boss has just said that's wrong. He thinks a search for 'dog' should just return 'dog' items, not items in which dog happens to be a word. Their old search used simple 'like '%,dog,%' tests in the where clause, and the inclusion of the comma delimiters meant their old search really did do 'word search' instead of phrase and partial-phrase matching.
What can I say to persuade him that the Oracle Text mechanism is the more "appropriate" or correct way of doing things? Is there anything I can do to my code to make it more 'word sensitive' and less able to spot words within phrases? Or would that be a dumb way to go?
I did think of this, but it doesn't seem to work:
SQL> select * from texttst where contains (col1,'",dog,"')>0;
COL1
,hot dog,sausage,
,hot,dog,sausage,The request to find comma-dog has nevertheless matched space-dog. But even if you could persuade Oracle to pay attention to the commas, would it be a good idea to do so?
It's a more philosophical question, I suppose, than a technical one. Just interested in people's views.

You can use a standard Oracle Text search to obtain the larger result set then add additional filtering criteria using like or instr to obtain the smaller set from the larger set. This should enable it to use the domain index to obtain the larger set quickly and still get the desired results. Please see the demonstration below.
SCOTT@orcl_11g> CREATE TABLE texttst
  2    (col1  VARCHAR2 (60))
  3  /
Table created.
SCOTT@orcl_11g> INSERT ALL
  2  INTO texttst VALUES ('hot dog')
  3  INTO texttst VALUES ('dog collar')
  4  INTO texttst VALUES ('dog and cat')
  5  INTO texttst VALUES (',hot dog,sausage,')
  6  INTO texttst VALUES (',hot,dog,sausage,')
  7  SELECT * FROM DUAL
  8  /
5 rows created.
SCOTT@orcl_11g> INSERT INTO texttst SELECT object_name FROM all_objects
  2  /
68663 rows created.
SCOTT@orcl_11g> CREATE INDEX testtxt_col1_idx ON texttst (col1)
  2  INDEXTYPE IS CTXSYS.CONTEXT
  3  /
Index created.
SCOTT@orcl_11g> EXEC DBMS_STATS.GATHER_TABLE_STATS (USER, 'TEXTTST')
PL/SQL procedure successfully completed.
SCOTT@orcl_11g> SET AUTOTRACE ON EXPLAIN
SCOTT@orcl_11g> SELECT *
  2  FROM   texttst
  3  WHERE  CONTAINS (col1, 'dog') > 0
  4  AND    INSTR (col1, ',dog,') > 0
  5  /
COL1
,hot,dog,sausage,
Execution Plan
Plan hash value: 149214848
| Id  | Operation                   | Name             | Rows  | Bytes | Cost (%CPU)| Time     |
|   0 | SELECT STATEMENT            |                  |     1 |    24 |     1   (0)| 00:00:01 |
|*  1 |  TABLE ACCESS BY INDEX ROWID| TEXTTST          |     1 |    24 |     1   (0)| 00:00:01 |
|*  2 |   DOMAIN INDEX              | TESTTXT_COL1_IDX |       |       |     0   (0)| 00:00:01 |
Predicate Information (identified by operation id):
   1 - filter(INSTR("COL1",',dog,')>0)
   2 - access("CTXSYS"."CONTAINS"("COL1",'dog')>0)
SCOTT@orcl_11g> SET AUTOTRACE OFF
SCOTT@orcl_11g>

Similar Messages

  • Need to provide Delegation part to End Users

    Need to provide set delegation part to end users. So, we have provided link to delegateWorkItems.jsp to end users. By that way, the end user can open the builtIn form “End User Delegate WorkItems”, How ever, the user is not able to get users to delegate by searching lighthouse users.
    And if the user has any capability, then the user is getting users to set delegating from end user page. But I don’t want to give any capabilities to users.
    I have done the following things in my system, But got failure result
    Have written rule to get AllMatchUsers in Separate rule library.
    <Rule name='getAllMatchUsers'>
    <RuleArgument name='userAccountId'/>
    <RunAsUser>
    <ObjectRef type='User' id='#ID#Configurator' name='Configurator'/>
    </RunAsUser>
    <invoke name='getUsers' class='com.waveset.ui.FormUtil'>
    <select>
    <ref>context</ref>
    <ref>:display.session</ref>
    <invoke name='getLighthouseContext'>
    <ref>WF_CONTEXT</ref>
    </invoke>
    </select>
    <map>
    <s>conditions</s>
    <list>
    <new class='com.waveset.object.AttributeCondition'>
    <s>name</s>
    <s>startsWith</s>
    <ref>userAccountId</ref>
    </new>
    </list>
    </map>
    </invoke>
    </Rule>
    And have called this rule in “Administrator Library” (BuiltIn Lib) at t”oUsers” Field as Value.
    Please suggest me.

    Hi,
    <call name="LIB_Rules:getAllMatchUsers">
    <map>
    <s>userAccountId'</s>
    <s>emp001</s>
    </map>
    </call>
    I have used the above code to call rule, then it has not worked.
    But by the below code its working fine. How ever, I don't know the reason (IdmVersion is 7.1).
    <rule name='LIB_Rules:LEX_RUL_getAllMatchUsers'>
    <argument name='userAccountId' value='emp001'/>
    </rule>
    Thanks,
    Ravi.

  • TS1544 I am the administrator of my MacBook Pro, which I share with my kids. One of them forgot his password, so as the admin I changed it for his account, but  when I try to see his account, it says I need to provide the keychain password. How can i get

    I am the administrator of my MacBook Pro, which I share with my kids. One of them forgot his password, so as the admin I changed it for his account, but  when I try to see his account, it says I need to provide the keychain password. How can i get it? I have no idea how to sort this out...

    First, make sure caps lock is not on.
    You must back up all data before continuing, unless you've already done so. If you need to back up but can't log in, ask for instructions.
    If the user account is associated with an Apple ID, and you know the Apple ID password, then maybe the Apple ID can be used to reset your user account password.
    Otherwise*, boot into Recovery mode. When the OS X Utilities screen appears, select
    Utilities ▹ Terminal
    from the menu bar. In the Terminal window, type this:
    res
    Press the tab key. The partial command you typed will automatically be completed to this:
    resetpassword
    Press return. A Reset Password window opens.
    Select your boot volume ("Macintosh HD," unless you gave it a different name) if not already selected.
    Select your username from the menu labeled Select the user account if not already selected.
    Follow the prompts to reset the password. It's safest to choose a password that includes only the characters a-z, A-Z, and 0-9.
    Select
     ▹ Restart
    from the menu bar.
    You should now be able to log in with the new password, but your Keychain will be reset (empty.) If you've forgotten the Keychain password (which is ordinarily the same as your login password), there's no way to recover it.
    *Note: If you've activated FileVault, this procedure doesn't apply. Follow instead the instructions on this page:
    If you forget the password and FileVault is on

  • I need to provide red color to the texbox control in list tile

    Hi,
    I need to provide red color to the texbox control in list tile, please reply if any one knows how to do it.
    Thanks,
    Vijay.

    Hi,
    I am afraid that this kind of enhancements/modifications needs some developing which requires a deeper knowledge of Mobile development and sufficient project experience.
    Unfortunately it is not possible to achieve this by doing "only" some customizing settings.
    Regards,
    Wolfhard

  • Need to provide F4 functionality to customer field on SRM Screen

    Hi all,
    I was created 4 input fields on SRM WEB screen. I need to provide F4 functionality for the first field.if user clicks on the find button it has to show list of all values related to the above mentiones 4 fields. in this four fields one field is the key field. if user select on key field the corresponding values has to be populated in the reamining 3 fields along with the key field.
    how to achive this. is there any badi for this.pls suggest me the sample code if any thing is  there.

    Hello,
    If you are using custommer fields according to notes 672960 and 458591, the F4 option are self-generated when defining in the include (CI* or INCL_EEW_PD* ) a foreign key or a search help.
    Rgds,
    Pierre

  • Need to provide certain informations within BEX Analyzer

    Hi folks,
    we need to provide certain information to users being connected over BEX Analyzer ...
    Is there any way to write a custom help text or to provide some kind of info box or pop up or something similar to the info box on the SAP logon screen or anything else that can be used to inform users of certain things ?
    Tricky thing is, that we don't want a permanent pop up appearing every time the user logs on to the analyzer. It's supposed to be more like something that the user can open every time he wants to look up the information or alternatively a permanent info text somewhere on the screen or maybe under the system information that one can open up under Bex Analyzer ...
    Or how about adding a new (custom) button to the BEX Toolbar opening an information window ? Is that possible ?
    Any idea what could be done to accomplish this ?
    Regards
    Thomas
    Edited by: Thomas Schmitt on Jul 8, 2009 10:52 AM

    Hi,
    Is it an idea to make one or more  Excel Comment fields in your template
    Like directly under your company logo using a row with Excel cells with subjectnames and adding the documentation as comments in there?
    Udo

  • HT1937 why do i need to provide with a Credit card info in order to get apps to my new iphone5?

    Why do i need to provide Credit Card info in order to get apps to my new iphone5???

    but im trying to get an "app" that is supposed to be "free"

  • Do I need to provide the physcial hostname to iAS during installation or can I just that installed name into the /etc/hosts file?

     

    Hi,
    Pls confirm if you are using Windows 2000 Pro, in this O/S the
    hostname is the name of the computer itself. Check the
    MyComputer->Properties->Network Identification->Properties, the name you
    find under the computer name will be automatically taken while
    installation, if it doesn't then there is some error. However the
    C:\Winnt\System32\Drivers\Etc\hosts doesn't matter much while installing
    iAS 6.0 SP1 or above. Hope this helps
    Regards
    Raj
    Hazel Seow wrote:
    Do I need to provide the physcial hostname to iAS during installation
    or can I just that installed name into the /etc/hosts file?
    Try our New Web Based Forum at http://softwareforum.sun.com
    Includes Access to our Product Knowledge Base!

  • Need to provide local machine overrides

    Hi,
    Our users have their home directories served up from a network file server. For certain machines we now need to provide local home directories for some, but not all, users, i.e., dave logs into machine foo and gets /Users/dave but on machine bar he gets /server/fs0/dave. Fred, on the other hand, gets /server/fs0/fred on both machines.
    We've used a per machine mapping in our ODS which makes ALL users get the /Users/username on foo, but we ideally want to make this a per user decisions.
    I thought I'd found how to do this when I saw the per machine Accounts ACL in the Workgroup Manager but, sadly, that doesn't appear to allow for overriding the home directory setting.
    Any help much appreciated,
    Dabe

    Hi,
    I agree with Senne, in addition, we can also use net command to perform local group management.
    More information for you:
    Add a member to a local group
    http://technet.microsoft.com/en-us/library/cc772524.aspx
    How to Make a Domain User the Local Administrator for all PCs
    http://social.technet.microsoft.com/wiki/contents/articles/7833.how-to-make-a-domain-user-the-local-administrator-for-all-pcs.aspx
    Best Regards,
    Amy
    Please remember to mark the replies as answers if they help and un-mark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected]

  • My membership is activated, why I still need to provide a serial number??

    My membership is activated, why I still need to provide a serial number??

    A chat session where an agent may remotely look inside your computer may help
    Creative Cloud chat support (all Creative Cloud customer service issues)
    http://helpx.adobe.com/x-productkb/global/service-ccm.html
    Cancel http://helpx.adobe.com/x-productkb/policy-pricing/return-cancel-or-change-order.html

  • Campaign - Need to provide 2 different View Configurations for same Role

    Hello,
    I need to provide for the same role config key 2 different view configurations for campaigns. Initially I wanted to do that with transaction types, but then I found out that there are no transaction types for campaigns.
    Does anyone know a way to do that? I don'T want to use a BADI for it, best would be a standard way.
    Thanks!

    You use Object Types to distinguish between views of same RoleConfigKey. In SPRO 'UI Framework Definition', you create object types and they would be available when you create a view config. Just select the object type as it forms part of the 'key' that idenitifies that particular view. In DO_CONFIG_DETERMINATION method of that view, you call a config based on this Object Type. So same view can produce two or more configs for same user in different scenarios.

  • HT3986 Using Boot Camp 4 and Windows 7.   Try to change name of the C: drive and get the dialog "You will need to provide administrative permission to change the name".  How do I change the C: drive name?

    I tried to change name of the C: drive and get the dialog "You will need to provide administrative permission to change the name".  How do I change the C: drive name?

    Forgot to specify:
    Im using an older Unibody Macbook (back when they were not all macbook pro's) 2008ish with Snow leopard 1.6.8
    The thread you linked me to, Eric, shows the guy 'Niganit' with the eXACT SAME PROBLEM as me! He seems to have found out the problem but I dont see his resolve.
    I just dont have the option to install windows 7 in any other form that a cd
    a picture;

  • Need to provide local administrator access without domain administrator rights

    Hi All,
    I need to provide local admin access to one account in windows environment without providing domain administrator rights.
    Windows 2008 DC. Desktops : windows 7
    So that we can use this account to install agents like SCCM\SCOM in all servers & desktops.
    Need suggestions.

    Hi,
    I agree with Senne, in addition, we can also use net command to perform local group management.
    More information for you:
    Add a member to a local group
    http://technet.microsoft.com/en-us/library/cc772524.aspx
    How to Make a Domain User the Local Administrator for all PCs
    http://social.technet.microsoft.com/wiki/contents/articles/7833.how-to-make-a-domain-user-the-local-administrator-for-all-pcs.aspx
    Best Regards,
    Amy
    Please remember to mark the replies as answers if they help and un-mark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected]

  • Why do I need to provide my phone number when purchasing Lightroom?

    I've never had to provide my phone number before on any other platform which I've ordered other products on. Why do I need to provide such a personal information to Adobe? 

    I can think of two reasons:
    1)  A phone number is typically asked for when purchasing via a credit-card so the card can be validated.
    2)  So Adobe, at some point in the future, can call you to set up a remote session with your computer as part of a technical-support issue resolution..

  • HT4718 I purchased used macbook pro in online now i want to restore the laptop. i tried restoring it using OS X internet recovery but it is asking me for the apple id i provided my apple id. the prob is i need to provide registered id which i dont have pl

    I purchased used macbook pro in online now i want to restore the laptop. i tried restoring it using OS X internet recovery but it is asking me for the apple id i provided my apple id. the prob is i need to provide registered id who purchased it earlier which i dont have pl help me.

    pardhuandey wrote:
    I purchased used macbook pro in online now i want to restore the laptop. i tried restoring it using OS X internet recovery but it is asking me for the apple id i provided my apple id. the prob is i need to provide registered id who purchased it earlier which i dont have pl help me.
    You will need to sign up for your own Apple ID and then buy and download Lion by calling Apple and getting a redemption code.
    Good Luck
    Pete

Maybe you are looking for

  • Profit Centre in F-38 and F-55

    Hi Good day to you. In Statistical Posting in Vendor and Customer (T Codes F-38 and F-55), Profit Centre field is not available. We tried to achieve Posting to Profit Centre Field in F-38 by substituting the value entered in Assignment Field (ZUONR)

  • ADF Faces: Making a selectOneChoice in java code?

    I need to make a selectOneChoice to reuse in my pages (country selection) but can't seem to find how to do it on the web? here is what i've attempted with the error output... -------------------- the java code: public void contextInitialized(ServletC

  • Newly added music problem

    I have a problem in the "newly added" playlist in Walkman. Whenever I open the newly added playlist after my phone is plugged in to my computer, the playlist shows older songs instead of the latest songs copied to my SD card. Anyway, I am using Xperi

  • Learning Some Basics

    Hey gang, I've been learning al I can for the past few days but I'm still green as spring tree. Right now, I'm trying to customize a template so that the drop shadow text reflects the standard text I have already customized. It pulls up in the main w

  • MacBook Pro 3,1 (Mid/Late 2007) running Mountain Lion audio issue?

    Hello Everyone, A few months ago, I installed the ML (Golden Master) over my copy of Lion. Lion was running great prior to install. After the upgrade, everything ran perfect, but I was having issues with both Ableton Live, Logic, iTunes and audio/vid