WildCard with And

Can someone please help me. I know some stuff about Oracle Text and then it seems like when I get it figured out something else breaks. I know "And" is a stopword so I've made my own stopword list and made "and" a regular word
This is my contains statement;
AND CONTAINS (location, '%BRICK {AND}%
OR $(SYN(BRICK) AND SYN({AND}))
OR ?(SYN(BRICK) AND SYN({AND}))
OR !(SYN(BRICK) AND SYN({AND})) ',1) > 0)
The Problem is I get a "WildCard error to many"
However
If I do this;
AND CONTAINS (location, '{%BRICK AND%}
OR $(SYN(BRICK) AND SYN({AND}))
OR ?(SYN(BRICK) AND SYN({AND}))
OR !(SYN(BRICK) AND SYN({AND})) ',1) > 0)
No Errors. I get two records back.
or this
AND CONTAINS (location, '%AND%
OR $(SYN({AND}))
OR ?(SYN({AND}))
OR !(SYN({AND})) ',1) > 0)
No Errors. I get records back.
I don't understand this. In the first contains it looks for a word or a word with "brick" in it and then the word "and" and then another word.
The second contains looks for any words that has a word with or without "brick" , "and" in a word or not, and then anything else.
Is this right or am I misunderstanding something. I only have about 47,000 records in the table so I can't understand why I am getting this error.
These are my preferences
begin
ctx_ddl.create_preference('PREF_SOUNDEX', 'BASIC_WORDLIST');
ctx_ddl.set_attribute('PREF_SOUNDEX','PREFIX_INDEX','TRUE');
ctx_ddl.set_attribute('PREF_SOUNDEX','PREFIX_MIN_LENGTH',3);
ctx_ddl.set_attribute('PREF_SOUNDEX','PREFIX_MAX_LENGTH',15);
ctx_ddl.set_attribute('PREF_SOUNDEX','SUBSTRING_INDEX','TRUE');
ctx_ddl.set_attribute('PREF_SOUNDEX','WILDCARD_MAXTERMS',15000);
ctx_ddl.create_preference('MAF_LEXER','BASIC_LEXER');
ctx_ddl.set_attribute('MAF_LEXER','printjoins','-#&');
ctx_ddl.set_attribute('MAF_LEXER','skipjoins','(.),');
end;
How exactly does the substring index work? Are there to many words with "and" in them and that is why it gives me this error?
Any help is greatly appreciated
Thanks
Jeff

I believe the problem is that you cannot combine escaping with {} and wildcarding with %. It seems to have the effect of attempting to expand to include every indexed term, as if you had searched for just %. Even if you have a small enough dataset and/or wildcard_maxterms set high enough, although it will not produce an error, it also does not return any rows. Please see the demonstration below.
SCOTT@10gXE> -- table:
SCOTT@10gXE> CREATE TABLE your_table (location VARCHAR2 (30))
  2  /
Table created.
SCOTT@10gXE> -- data:
SCOTT@10gXE> INSERT ALL
  2  INTO your_table VALUES ('WORD')
  3  INTO your_table VALUES ('WORDS')
  4  INTO your_table VALUES ('WHATEVER')
  5  SELECT * FROM DUAL
  6  /
3 rows created.
SCOTT@10gXE> -- preferences:
SCOTT@10gXE> begin
  2    ctx_ddl.create_preference('PREF_SOUNDEX', 'BASIC_WORDLIST');
  3    ctx_ddl.set_attribute('PREF_SOUNDEX','PREFIX_INDEX','TRUE');
  4    ctx_ddl.set_attribute('PREF_SOUNDEX','PREFIX_MIN_LENGTH',3);
  5    ctx_ddl.set_attribute('PREF_SOUNDEX','PREFIX_MAX_LENGTH',15);
  6    ctx_ddl.set_attribute('PREF_SOUNDEX','SUBSTRING_INDEX','TRUE');
  7    ctx_ddl.set_attribute('PREF_SOUNDEX','WILDCARD_MAXTERMS', 6);
  8    ctx_ddl.create_preference('MAF_LEXER','BASIC_LEXER');
  9    ctx_ddl.set_attribute('MAF_LEXER','printjoins','-#&');
10    ctx_ddl.set_attribute('MAF_LEXER','skipjoins','(.),');
11  end;
12  /
PL/SQL procedure successfully completed.
SCOTT@10gXE> -- index:
SCOTT@10gXE> CREATE INDEX your_index ON your_table (location)
  2  INDEXTYPE IS CTXSYS.CONTEXT
  3  PARAMETERS
  4    ('WORDLIST pref_soundex
  5        LEXER       maf_lexer
  6        STOPLIST CTXSYS.EMPTY_STOPLIST')
  7  /
Index created.
SCOTT@10gXE> -- This is what is tokenized, indexed, and searchable:
SCOTT@10gXE> SELECT token_text FROM dr$your_index$i
  2  /
TOKEN_TEXT
WHA
WHAT
WHATE
WHATEV
WHATEVE
WHATEVER
WHATEVER
WOR
WORD
WORD
WORDS
WORDS
12 rows selected.
SCOTT@10gXE> -- This works:
SCOTT@10gXE> SELECT * FROM your_table
  2  WHERE  CONTAINS (location, 'WORD%', 1) > 0
  3  /
LOCATION
WORD
WORDS
SCOTT@10gXE> -- the following queries expand to more than 6 of the above tokens:
SCOTT@10gXE> SELECT * FROM your_table
  2  WHERE  CONTAINS (location, '{WORD}%', 1) > 0
  3  /
SELECT * FROM your_table
ERROR at line 1:
ORA-29902: error in executing ODCIIndexStart() routine
ORA-20000: Oracle Text error:
DRG-51030: wildcard query expansion resulted in too many terms
SCOTT@10gXE> SELECT * FROM your_table
  2  WHERE  CONTAINS (location, '%', 1) > 0
  3  /
SELECT * FROM your_table
ERROR at line 1:
ORA-29902: error in executing ODCIIndexStart() routine
ORA-20000: Oracle Text error:
DRG-51030: wildcard query expansion resulted in too many terms
SCOTT@10gXE> -- increase wildcard_maxterms:
SCOTT@10gXE> exec ctx_ddl.set_attribute('PREF_SOUNDEX','WILDCARD_MAXTERMS', 50)
PL/SQL procedure successfully completed.
SCOTT@10gXE> drop index your_index
  2  /
Index dropped.
SCOTT@10gXE> CREATE INDEX your_index ON your_table (location)
  2  INDEXTYPE IS CTXSYS.CONTEXT
  3  PARAMETERS
  4    ('WORDLIST pref_soundex
  5        LEXER       maf_lexer
  6        STOPLIST CTXSYS.EMPTY_STOPLIST')
  7  /
Index created.
SCOTT@10gXE> -- now there is no error:
SCOTT@10gXE> SELECT * FROM your_table
  2  WHERE  CONTAINS (location, '{WORD}%', 1) > 0
  3  /
no rows selected
SCOTT@10gXE> SELECT * FROM your_table
  2  WHERE  CONTAINS (location, '%', 1) > 0
  3  /
LOCATION
WORD
WORDS
WHATEVER
SCOTT@10gXE>

Similar Messages

  • I bought the new ipad (ipad 3) in July 2012.  what software did it come with and does it have siri?

    i bought the new ipad (ipad 3) in July 2012.  what software did it come with and does it have siri?

    The new iPad comes with iOS 5.1.1.
    To get all new functionality and Siri, you need to update to iOS 6.
    Be aware that if you were a Google Maps App user this has been replaced by version 1.0 of Apple's own new Maps App.
    From the many user reviews, Apple's Map App is still a work in progress.
    You can still access Google Maps from the Safari web browser.
    Also, the YouTube app has, also, made a disappearing act.
    You can use mobile YouTube from Safari to still view YouTube or a YouTube client app called Jasmine or download the Google YouTube App for iPhone. Google is working on a new YouTube App for iPad and isn't available, as yet.

  • I have just downloaded OSX Mavericks and am having a lot of problems with my iCloud account. I get a message "this iMac can't connect to iCloud because of a problem with (and then it quoted my e-mail address) Does anybody know what the problem could be??

    As mentioned above I have just downloaded OSX Maverick to my iMac. I am now having a lot of problems with iCloud. I get the message that "This iMac can't connect to iCloud because of a problem with, and then it goes on to quote my e-mail address. It then says to open iCloud preferences to fix this problem.
    I do this and no matter what I seem to do this message continues to return.
    Can anybody explain how to resolve this problem (please bear in mind that I am noy very computer literate).
    Many thanks
    Mike

    Hello John
    Sorry I haven't got back to you sooner.
    Thanks very much for your help, your solution solved my problem.
    Thanks again and kind regards
    Mike

  • My ipod generation 5 will not come out of recovery mode. i was simply updating my software and this happened. it will not let me restore it comes up with and error. please help, thanks.

    my ipod generation 5 will not come out of recovery mode. i was simply updating my software and this happened. it will not let me restore it comes up with and error. please help, thanks.

    Hey erinoneill24,
    Thanks for using Apple Support Communities.
    Sounds like you can't update your device. You don't mention an error that it gives you. Take a look at both of these articles to troubleshoot.
    iPod displays "Use iTunes to restore" message
    http://support.apple.com/kb/ts1441?viewlocale=it_it
    If you can't update or restore your iOS device
    http://support.apple.com/kb/HT1808?viewlocale=de_DE_1
    If you started your device in recovery mode by mistake, restart it to exit recovery mode. Or you can just wait—after 15 minutes the device will exit recovery mode by itself.
    Have a nice day,
    Mario

  • Bex Report with and without BIA . . Fails with a dump EXPORT_TOO_MUCH_DATA

    Hi Folks,
    We have a report thats has been running well in production for more about 18 months. This month it did not complete execution.
    We did implement BIA couple of 4 months back and the run times have drastically reduced after the BIA. Now this query execution results in a Dump with and without BIA.  FYI the underlying cube has 195,876,020 records only.
    Name of Runtime error: EXPORT_TOO_MUCH_DATA
    Short text:     Too much data for export.
    What happened?     Runtime error
        The current ABAP program "CL_RSR_CACHE_DO_SPID==========CP" had to be
         terminated because one     of the statements could not be executed at runtime.
    Error analysis: The dataset stored under an EXPORT/IMPORT ID is restricted
    by
    1. The maximum possible size of 2 GB
    2. The length of a data record and the capacity of the sequence counter. This error occurs only if the capacity of the
    sequence counter does not go beyond 255.
    Source Code Extract:
        1 METHOD if_rsr_cache_data_object~get_xstring.
        2
        3   FIELD-SYMBOLS:
        4     <l_xstring>            TYPE xstring,
        5     <l_sp>                 TYPE ANY,
        6     <l_spinfo>             TYPE ANY.
        7
        8   CREATE DATA r_r_xstring.
        9   ASSIGN r_r_xstring->* TO <l_xstring>.
       10   ASSIGN n_s_spid-r_sp->*     TO <l_sp>.
       11   ASSIGN n_s_spid-r_spinfo->* TO <l_spinfo>.
       12
       13 *... Sp has to be the first component
    >>>>>   EXPORT sp = <l_sp> spinfo = <l_spinfo>
       15          TO DATA BUFFER <l_xstring> COMPRESSION ON.
       16
       17 ENDMETHOD.
    Referred to the below note 0001232573
    which says to have 'RSRCACHE_ITAB_COMPR'  parameter using report SAP_RSADMIN_MAINTAIN
    Note say the below (It might be a little tricky, to find an appropriate value for 'RSRCACHE_ITAB_COMPR' as it heavily depends on the query-specific data structures that are stored in the cache. The general recommendation would be to start with a value of about 5000. Test this with a query, that dumped previously. In case the dump persists reoccurs, reduce the value of the parameter significantly. Otherwise, if no dump occurs but you face noticeably longer runtimes, increase the parameter.)
    We are trying not able to get to the right parameter value. (changed it from 5000, 4000, 3000, & 1000) without much  help.  Did any of you had to change this parameter. How low or High can this parameter be changed?
    We would like to understand if changing any other parameters would help in RSADMIN table would help?
    Any thoughts from the experts would be appreciated
    Thanks,
    FHF

    Hi,
    Are you running the report for all the selections(all the data )?
    execute the report with data selection and check?
    Is the data in the Ic - compressed?
    Regards
    KP

  • VA01: Creation of SD order with several material codes,with and without VAT

    hi guys,
    could someone tell me how to set up the system to not be able to create an SD orders with a mix of VAT condition?
    We don't want a sales order with an combination with and without VAT.
    Pls advise. Thanks.

    could someone tell me how to set up the system to not be able to create an SD orders with a mix of VAT condition?
    We don't want a sales order with an combination with and without VAT.
    H i
    1.The Vat ( Tax ) is applicable on basis of Customer and Mareial Tax classification.
    2. So as far as material is concerned , group all VAT applicable material in One Division
    Say in FMCG Company
    Divisions are Soaps , Skin Care , Shampoo etc
    Create Sub Divsions say for Eg Soaps-------Soaps 1( Taxable) & Soaps 2 .( Non Taxable ) and acordingly for other divisions
    And then Create Sales Areas accordingly.
    All this will need Reorganisation of your Sales Area
    Regards
    Rohit

  • IPad1 stuck in recovery mode with and ITunes cannot restore with an error code of 11?

    I tried to update to IOS 4.3.4 today but now my iPad1 stuck in recovery mode with and ITunes cannot restore with an error code of 11?
    (With the old discussion groups it was easy to see where other people had similar problems, these new groups seems clunky in comparison)

    OK, fixed it by using SHIFT+RESTORE to load the iPad1,1_4.3.4_8K2_Restore.ipsw  file in directly from the
    C:\Documents and Settings\<user name>\Application Data\Apple Computer\iTunes\iPad Software Updates
    folder.
    No idea why the upgrade to 4.3.3 failed in the first place and no idea why iTunes was not clever enough to just do it by itself when it detected that there was a problem in the first place.

  • XSLT mapping not working b'coz " " & " " replaced with and

    Hello Experts,
      I have a RFC to JMS scenario. One of the parameter of RFC is a string field. This field will contain the XML data in it.
    I need to create a complete XML payload using this data in a string field. For this I am using XSLT map :
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
         <xsl:output method="xml" omit-xml-declaration="no"/>
         <xsl:template match="/">
              <xsl:for-each select="//Nem">
                   <xsl:copy-of select="."/>
              </xsl:for-each>
         </xsl:template>
    </xsl:stylesheet>
    This XSLT mapping works fine when tested independently.
    But in actual scenario at runtime the "<" & ">" used to indicate a node are getting replaced with < and >. Then the XSLT mapping fails and produces no output.
    The output of XSL will be passed in to a java mapping which signs the payload digitally.
    What is the issue with these signs? How can I overcome this problem?
    Any inputs will be of great help.
    Kind Regards,
    Abhijeet.
    Edited by: Abhijeet Ambekar on May 4, 2010 2:01 PM

    Hi Stefan,
      Yes - I want to get rid of & # 60. But these (& # 60 and & # 62) are not added by XSLT mapping. Rather they are in the input available to XSLT map.
    In sxmb_moni, i can see the inbound payload correctly :
    <?xml version="1.0" encoding="UTF-8" ?>
    - <rfc:HDK083_REFUS_SENDDOCU xmlns:rfc="urn:sap-com:document:sap:rfc:functions">
      <P_SIGN_DOCUMENT />
      <P_XML_DOCUMENT><NemRefusionIndberetningSamling><NemRefusionIndberetningStruktur MessageID="1"><HeaderStruktur><SignOffIndikator>true</SignOffIndikator><TransaktionKode>Opret</TransaktionKode><IndberetningstypeKode>Anmeldelse</IndberetningstypeKode><FravaerTypeKode>Sygdom</FravaerTypeKode><FravaerendeStruktur><FravaerendeTypeKode>Loenmodtager</FravaerendeTypeKode><LoenUnderFravaerIndikator>false</LoenUnderFravaerIndikator></FravaerendeStruktur><IndberetningUUIDIdentifikator>bf9cc44e-af15-4e19-8457-5845d75385d2</IndberetningUUIDIdentifikator><ReferenceAttributTekst>ref. Nielsen-1503831372 (23. oktober 2009)</ReferenceAttributTekst>
    but when I try to download the payload or right click on payload to view source I get something like below:
    <?xml version="1.0" encoding="UTF-8"?><rfc:HDK083_REFUS_SENDDOCU xmlns:rfc="urn:sap-com:document:sap:rfc:functions"><P_SIGN_DOCUMENT></P_SIGN_DOCUMENT><P_XML_DOCUMENT>& # 6 0;NemRefusionIndberetningSamling& # 62; & # 60;NemRefusionIndberetningStruktur MessageID="1"& #62;& #60;HeaderStruktur& #62;& #60;SignOffIndikator& #62;true& #60;/SignOffIndikator& #62;& #60;TransaktionKode& #62;Opret& #60;/TransaktionKode& #62;& #60;IndberetningstypeKode& #62;Anmeldelse& #60;/IndberetningstypeKode& #62;& #60;FravaerTypeKode& #62;Sygdom& #60;/FravaerTypeKode& #62;& #60;FravaerendeStruktur& #62;& #60;FravaerendeTypeKode& #62;Loenmodtager</FravaerendeTypeKode><LoenUnderFravaerIndikator& #62;false</LoenUnderFravaerIndikator></FravaerendeStruktur& #62;<IndberetningUUIDIdentifikator& #62;bf9cc44e-af15-4e19-8457-5845d75385d2& #60;/IndberetningUUIDIdentifikator& #62;& #60;ReferenceAttributTekst& #62;ref. Nielsen-1503831372 (23. oktober 2009)& #60;/ReferenceAttributTekst& #62;
    (extra spaces added to "& # 60" as browser was converting it to < ,>)
    If i take the source code for payload and test XSLT mapping, it fails. But if I manually replace all "& # 60" with < and "& # 6 2" with >, then the mapping works fine.
    So I think for XSLT map to work correctly, we need to replace all "& # 60 " . Please suggest.
    Kind Regards,
    Abhijeet.

  • I'm new to Photoshop Elements and just getting started.  While in the organizer I have one group of photos up to learn with and now it says Edit in Progress with a padlock icon.  How can I remove this so that the photos will be restored to normal?

    I'm new to Photoshop Elements and just getting started.  While in the organizer I have one group of photos up to learn with and now it says Edit in Progress with a padlock icon.  How can I remove this so that the photos will be restored to normal?

    Go back to the editor and close the photo there.

  • Is there an issue going on with the iPhones? And iPads? I cannot send text pics.  I can't get on Facebook, and I can't get on anything that uses Facebook ex Slotomania.  This has been going on for a few days!!!  It is happening with and without upgrades.

    Is there an issue going on with the iPhones? And iPads? I cannot send text pics.  I can't get on Facebook, and I can't get on anything that uses Facebook ex Slotomania.  This has been going on for a few days!!!  It is happening with and without upgrades.

    Contact facebook to address the facebook issues.

  • Camera wont capture when Tethering Canon T5i in Lightroom 4.4. Tried with and without card.

    I just unboxed a Canon T5i (700D). I've been shooting with a T2i for the past three years tethered to LR4 with no problem. Now with the T5i, i connect the camera, set up a new tether session and LR detects the camera in the pop up bar, but the sections for Shutter Speed, Aperture, and ISO are blank. The capture button is able to be clicked, but the camera does not respond. When the shutter on the camera is pressed, also no response. I have tried this with and without the SD card. I have used three usb cable and two different computers. I have checked for updates and my firmware is current. The camera is set to manual mode in the on position NOT the video position and I am tethering to a Windows 7 computer. Please help!

    You will need LR5 for that camera to be supported for direct tethered capture.  Or you can use the LR "Watched Folder" feature and use the EOS Utility or other tethering software packages.  Here is a list of some options - http://www.tethertools.com/plugging-in/software/

  • Can you connect and ipod nano 4/5th generation with and ipad to download music/update software

    Can you connect and ipod nano 4/5th generation with and ipad to download music/update software.
    If so how do you go about it and what equioment are you required to purchase.

    No you cannot.

  • T450s screen size? (with and without bezel/border)

    Hello, May I ask the exact dimensions of the screen, with and without the bezel (in metric system)?Here is an image of the 4 coords I would need: http://ximg.fr/view-23376686df3969b67183003635c63a4f.htmlThank you very much

    the attached image is a t550 indeed but that's because it was the only decent image i could find on google, so I confirm I require these infos for the T450s.
    Thanks

  • I've upgraded my app via iPhone and already paid for it but noting have changed. Who am I suppose to contact with. and how

    I've upgraded my app via iPhone and already paid for it but noting have changed. Who am I suppose to contact with and how?

    Contact the developer of the App.
    Just because an app is updated does not mean it should visually change, the update could simply be bug fixes.

  • Using START WITH and CONNECT BY PRIOR in a report

    Hi - I am using Oracle 9i and reports 10g. Does anyone know of a reason why running my sql in TOAD will produce the correct results, but the report is dropping records? I am using start with and connect by prior to build a hierarchy of linked records. The report is dropping the "child records" and only returning records from the route level.
    Thanks you for your help.

    Hi user574499
    Could u pls share us ur Query...?
    Regards,
    Abdetu...

Maybe you are looking for

  • Deleting a row from a JTable using a custom TableModel

    Before I waste any of your time I would like to go ahead and just say that I have searched through the forum using "delete row from Jtable" as the search keywords and while I have found very closely related issues, they have not solved my problem. I

  • Install Windows on iMac with no DVD drive

    I have a modified iMac.  It has a solid state drive in leui of the superdrive.   The SSD is a OWC drive. How can I install Windows?   I have tried modifying plist files, and kexts to allow me to use my MBA's USB superdrive, with no luck.    I have al

  • JDBC adapter connected to a DB in high availability!

    Hi folks, I have finished my scenario File -> XI -> JDBC and now I’m preparing to transport it to QAS. I found that Data Base of QAS is in two cluster nodes. I have two hostnames to fill the parameter <b><IP address></b> and I don’t know which hostna

  • New Mac Mini Anyone?

    Does anyone know if you can play video out of the HDMI output on the new Mac Mini? (Video within Logic that is). Thx Felix

  • How much discount would a 12 year old kid get for MacBook Pro (13 inch)?

    How much discount would a 12 year old kid get for MacBook Pro (13 inch)? He needs it for school and using iMovie. Please answer this fast as possible. Thank you.