Sorry for this newbie question...

Requirement:
return all documents which does not contain the word "mango"
Code typed:
where contains (ts_files.doc_blob, 'not mango', 1) > 0 )
-->ts_files is the table containing the files.
-->doc_blob is the blob field where files are located.
Returned Error ?:| :
ORA-29902: error in executing ODCIIndexStart() routine
ORA-20000: Oracle Text error:
DRG-50901: text query parser syntax error on line 1, column 2
Can YOU help me, Please ?
Mathew

If you have some other criteria to put before the "not mango", that would work. With a small number of rows, "% not mango" works. However, with a large number of rows with various data, like most such tables have, "% not mango" is likely to result in a wildcard query expansion error. Some alternatives are to use "contains (...) = 0" or " not (contains ...) > 0". These will still use the domain index, but avoid the problem with the wildcard expanding to too many terms. Please see the demonstration below.
SCOTT@orcl_11g> CREATE TABLE ts_files (doc_blob VARCHAR2(60))
  2  /
Table created.
SCOTT@orcl_11g> INSERT INTO ts_files VALUES ('apple')
  2  /
1 row created.
SCOTT@orcl_11g> INSERT INTO ts_files
  2  SELECT 'mango ' || object_name FROM all_objects
  3  /
68584 rows created.
SCOTT@orcl_11g> CREATE INDEX your_index ON ts_files (doc_blob)
  2  INDEXTYPE IS CTXSYS.CONTEXT
  3  /
Index created.
SCOTT@orcl_11g> EXEC DBMS_STATS.GATHER_TABLE_STATS (USER, 'TS_FILES')
PL/SQL procedure successfully completed.
SCOTT@orcl_11g> SET AUTOTRACE ON EXPLAIN
SCOTT@orcl_11g> SELECT * FROM ts_files
  2  WHERE  CONTAINS (ts_files.doc_blob, '% not mango', 1) > 0
  3  /
SELECT * FROM ts_files
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@orcl_11g> SELECT * FROM ts_files
  2  WHERE  CONTAINS (ts_files.doc_blob, 'mango', 1) = 0
  3  /
DOC_BLOB
apple
Execution Plan
Plan hash value: 1960511866
| Id  | Operation                   | Name       | Rows  | Bytes | Cost (%CPU)| Time     |
|   0 | SELECT STATEMENT            |            | 64644 |  1893K| 11343   (1)| 00:02:17 |
|   1 |  TABLE ACCESS BY INDEX ROWID| TS_FILES   | 64644 |  1893K| 11343   (1)| 00:02:17 |
|*  2 |   DOMAIN INDEX              | YOUR_INDEX |       |       | 10781   (0)| 00:02:10 |
Predicate Information (identified by operation id):
   2 - access("CTXSYS"."CONTAINS"("TS_FILES"."DOC_BLOB",'mango',1)=0)
SCOTT@orcl_11g> SELECT * FROM ts_files
  2  WHERE  NOT CONTAINS (ts_files.doc_blob, 'mango', 1) > 0
  3  /
DOC_BLOB
apple
Execution Plan
Plan hash value: 1960511866
| Id  | Operation                   | Name       | Rows  | Bytes | Cost (%CPU)| Time     |
|   0 | SELECT STATEMENT            |            | 64644 |  1893K| 11343   (1)| 00:02:17 |
|   1 |  TABLE ACCESS BY INDEX ROWID| TS_FILES   | 64644 |  1893K| 11343   (1)| 00:02:17 |
|*  2 |   DOMAIN INDEX              | YOUR_INDEX |       |       | 10781   (0)| 00:02:10 |
Predicate Information (identified by operation id):
   2 - access("CTXSYS"."CONTAINS"("TS_FILES"."DOC_BLOB",'mango',1)<=0)
SCOTT@orcl_11g>

Similar Messages

  • How to delete and pull up empty region - Sorry for the newbie question

    Hi,
    I know Avid and Final Cut Pro and both allow me to mark an empty region and delete it. This closes the gap of the empty region and then pulls the two clips together.
    Can I do this in Garage Band. I feel lame for asking.
    For example, let's say I'm editing dialogue in Garage band and I want to delete an "um". Can't I just mark it and then delete it, pulling the rest of the clip up?
    Thanks so much!
    Kirk

    The reason GB doesn't have this is because it was created for music - and there you want the gap to remain, otherwise everything that follows would be out of sync.
    If you're only editing spoken word, an audio editor is the better alternative. On the other hand, you can get used to editing audio in GB, you don't even have to do two cuts: Do the right cut and pull the right region on top of the left to where you want it (looking at the waveform). Done.

  • Sorry for the newbie question NX5U

    How do I transfer my standard definition video files on my SD card from my NX5U to DVD? I want to keep the raw footage forever and with tape it was easy. I'm new to this so forgive me.

    Treat the DVD as a data DVD, copy over the raw files.  The FULL CARD STRUCTURE files. 
    If you mean a PLAYABLE DVD, then you either author the DVD, or play out of the camera to a DVD recorder, or your edit system to a DVD recorder.  But that is by far the WORSE way to store your masters. 
    What you do is copy off the full card to hard drives, as DVDs are too small to hold the amount of data we are talking about here.  Copy the full structure to a hard drive, archive the drive.  TWO hard drives really, as drives will fail.
    Yeah, tape was by far more convenient to archive than tapeless media.

  • Sry for this Newbi question: what is the diff betw...

    I am using the E71, the black version bought from Hong Kong.. the only diff I can see is that the E71x is also black?? Does that mean I have the E71x phone? But I only see on the top right cornor of my phone its says E71 only and on pictures on the web it says E71x... hummm...
    Thanks
    Solved!
    Go to Solution.

    The E71x is an AT&T Branded phone.  It is NOT the same thing as an unlocked E71 with a black case.  There are hardware differences and software differences between the E71x and the E71 line of phones.
    E71-2 Grey Steel
    type: RM-357 code: 0569371 FW: 410.21.010
    08-02-2010 Nokia E71-2 (236.06)

  • I can not export photos onto DVD. After I click export, close iPhoto, click Finder, At this point I can't find the file to burn. (copy to be used on Windows) Sorry for the lame question....new to mac

    I can not export photos onto DVD. After I click export, close iPhoto, click Finder, At this point I can't find the file to burn. (copy to be used on Windows) Sorry for the lame question....new to mac

    So it sounds like you are trying to burn a DVD with photos on it so the photos can be either transferred to or displayed on a Windows PC, is that correct?
    For the purposes of this I am going to assume you are using iPhoto '11.
    Gather the photos you want to burn to DVD in one album in iPhoto. This is not absolutely necessary but it sure makes things easier for me.
    Select that album, then go to the File menu and select Export...
    In the dialog that shows up, select the File Export tab. Select the setting you want to use for export. Click the Export button.
    Another dialog will show up. Set the location to Desktop and click the New Folder button. Name the folder something nice and descriptive and click the Create button.
    Click the OK button. Quit iPhoto as the rest of this work will be done in the Finder.
    You will now have a folder on your desktop with that nice descriptive name. Find it and select it. Go to the File menu and from it select Burn "Descriptive folder name" to Disc...
    Insert a blank DVD when prompted.
    Let the finder complete the work and eject the disc afterwards.
    That's it. Best of luck.

  • HT2486 I am new to apple - sorry for ease of question. With my HP I have a label tab for email. I can create any title. How do I do this in apple

    Sorry for ease of question - I am new to apple/MAC. With my HP I can label my emails and keep all from a certain person. How do I do that with mac pro?

    Create a new smart mailbox. Details in Mail's help files. Once you straighten that out, see these:
    Switching from Windows to Mac OS X,
    Mac Basics—Tutorials on using a Mac,
    Mac OS X keyboard shortcuts,
    Anatomy of a Mac,
    MacTips,
    Switching to Mac Superguide, and
    Switching to the Mac: The Missing Manual, Mountain Lion Edition.
    Additionally, *Texas Mac Man* recommends:
    Quick Assist,
    Welcome to the Switch To A Mac Guides,
    Take Control E-books, and
    A guide for switching to a Mac.

  • Sorry for the dumb question...

    Sorry for the dumb question but I've never used two hard drives on a mac. On my second installed hard drive on my new Mac Pro, I can not create a new folder (the option is greyed out). What do I do?

    Try this:
    Right click (or ctrl-click) and select "Get Info"
    On the bottom, under "Ownership & Permissions", make sure that the pull down menu next to "You can" says "Read & Write".
    Under details, you can make your username the owner of the disk, with the same access.
    You can also click the "Ignore ownership on this volume" if you don't want any of those types of permissions.
    HTH!
    Brian

  • (Solved) Missing .xinitrc (sorry for a newb thing)

    so I made the move from Ubuntu to Arch.  Happy so far and am going to just do a minimal install and use openbox stand alone.  I have openbox installed but on the wiki it says to append "exec openbox-session" to ~/.xinitrc which I can't seem to find.  Sorry if this is a stupid question, but you can't learn if you don't ask and I couldn't find anything in the search.
    Last edited by FlyingHappy (2011-12-24 06:23:11)

    The wiki page on xinitrc will answer your questions...

  • Terribly Sorry For This Question

    I know it's somewhere but for some reason I can't find it. There is a link that is only an IP address for a website containing Mac Os games, classic old games and all freewares. I believe it was Don Archibald who answered but I am not sure. Can anyone give me this link because Mac OS 9 (at least the one I have) has no games at all!
    Thank you!

    Hi, sorry to bother you, but, I've been trying to locate someone who can answer a PowerPoint Question.
    I've been down loading updates from MicroSoft (Auto Update) over the past couple of years. The last update corrupted my PowerPoint and now I get
    The application "PowerPoint" could not be launched because of a shared library error: "4<Microsoft PowerPoint><OpenGLLibrary><CFMPriv_AGL><
    Can you help me? Please .....
    Gary

  • Some advice for this newbie please ... writing Network in Java

    K, i'm new to Java, and i've hardly done much Object-oriented coding but I have the basic concepts. University modules too focused on C, Visual Basic programming. =o( Currently, on Internship, I've been tasked to write Mobitex Network in Java, poll-driven. Have spent 3 weeks breathing Java =P, camping in Java Developer Connection too. =o) (enjoyed the exchange of ideas especially the post on "Java sucks")
    My questions are:
    1) Does Java have an indexed library like MSDN for VB? or is there any other way i can search for
    method names, their uses and the syntax? (the case-sensitivity of Java had me crazily
    debugging a simple test application) The lists of libraries available eg java.lang.string.*.
    2) Is there a help somewhere where i can check what my errors are referring to? I'm using
    JDK1.3.1_02 and Forte for Java, Community Edition version 3 for my IDE.
    3) I have plans to design simple user-interface, one that would probably look dos-like but with
    some buttons and forms coz the network has lots of functionalities that involve loop-back tests,
    choice of sending data, control or information frames. Duration to complete this project is 2
    months. Please suggest the best approach I should tackle this assignment and perhaps the
    links and softwares you'd recommend.
    ps: i chose this project over the rest to specifically learn Java. I knew the learning curve is steep but I seriously do want to get to know Java better, like a friend. And I'm looking forward to the sense of satisfaction awarded when I complete the application program. Thanks for your patience and words of advice. =)

    oh, ok then... I assume, then, that you have access to the C and/or C++ code.
    Is the C++ code written in "good" OOD style? Or is it C wrapped in some C++ syntax? If it's OO, without multiple inheritance, then you just have some porting to do. Painful, but not as bad as writing a Mobitex implementation on your own.
    Of course, timing is everything in this environment; depending on your platform (J2ME, I'd guess), you're gonna have to worry about meeting real-time-ish committments...
    I'd concentrate on getting the Mobitex functionality solid first. I'd assume that there are (some?) reference applications that have been created against the C & C++ implementations. Port those, or use those as inspiration for your own (little!) app...
    Larry

  • I apologize for this stupid question, but...

    Question: How do I configure Management access to new WAN devices, hanging off a Prod switch, but that MUST NOT join or mingle with Prod network and have them route correctly across their own subnet?
    I am going from a single Internet link to dual internet link.
    New ASR, ASA and DMZ stack.
    Only access to new devices is via Management interface via a management vlan that runs across the Prod network.
        requires a default gateway of the Management vlan.
    The ASR has a WAN link to ISP and will get the default gateway (DG) via BGP.
    The ASA and the DMZ should point to the ASR HSRP address for it's DG
    Configuring this default gateway to HSRP causes me to loose the Management access.
    I have seperate eigrp instance on new devices.

    Hey Mc,
    For 3750X:
    http://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst3750x_3560x/software/release/12-2_55_se/configuration/guide/3750xscg/swiprout.html#wp1319347
    For ASA5545x you may consider the following:
    http://www.cisco.com/c/en/us/td/docs/security/asa/asa90/configuration/guide/asa_90_cli_config/ha_contexts.html
    HTH.
    Regards,
    RS.

  • Please I would need the  correct Entity Diagram for this Two questions.

    This is to draw an Entity Relationship Modelling Diagram that will show inside dot for the "Must Need" end and outside dot on the "not must" end.
    You also need to put 1s and Ms relationship where needed.
    Question (1)
    The All Day Driving School
    The All Day Driving School has a number of instructors. Each instructor is assigned a car for their own use only.
    The school also has a spare car which is not assigned to a particular instructor.
    The driving school takes on pupils who are each allocated to an instructor. The pupil then books lessons with the instructor.
    New instructors have a short induction period before any pupils are allocated to them.
    Suggest suitable attributes for each table (assume that these will be discussed in detail with the user when you next meet with them).
    Extention to the scenario: Sometimes the pupil´s allocated instructor is not available when he/she requires a lesson, and a different instructor cover that lesson.
    How would you amend your diagram and tables so that it is still possible to identify the allocated instructor, but also to record who was the instructor for each lesson?.
    MY Answer:
    Attributes:
    Institution(InstitutionID, Name, Address, Telephone, Location)
    Instructor(InstructorID, Fname, Lname, Address, DOB, Gender)
    Car(CarID, RegistrationNo, Make, Model, Colour)
    Pupil(PupilID, IntructorID, LessonID)
    Lesson(LessonID, InstructorID, CarID, StartDate, EndDate, Cost, Details)
    Question (2)
    This is to draw an Entity Relationship Modelling Diagram that will show inside dot for the "Must Need" end and outside dot on the "not must" end.
    You also need to put 1s and Ms relationship where needed.
    London Allotments
    London City Council’s allotment department is responsible for the city’s allotments. Allotments are small areas of land that can be rented by council residents to grow vegetables and fruits. These allotments are rented by individuals. A site may have a paid manager who looks after the site and carries out any maintenance (such as repairing gates and fences): in this case, basic details of the manager are stored. As the site are spread throughout the city, each manager looks after exactly one site. A gardener rents a numbered allotment by paying the rented fee. Some gardeners rent several allotments but an allotment can only be rented by one named person. The allotments are in great demand and are never left vacant. Gardener’s details are recorded as soon as they are accepted for the waiting list,
    together with the date they were added to the list.
    Suggest suitable attributes for each table(assume that these will be discussed in details with the users when you next meet with them)
    Extension to the scenario: This scenario encourages you to draw an ERD that records only the current manager of each site, not previous managers. Similarly you
    were only expected to record the current gardener for each allotment. How would your diagram change if the council wanted to keep records of all the managers
    and gardners over several years? Does the basic rule for allocating foreign keys work for the new diagram? We are going to need more techniques, aren´t we?
    My Answer:
    Attributes:
    Council(CouncilID, Address, Telephone, Location)
    Manager(ManagerID, Fname, Lname, Address, DOB, Gender)
    Site(SiteID, RegistrationNo, Size, Location)
    Gardener(GardenerID, , Lname, Address, DOB, Gender)
    Allotment(AllotmentID, RentalFee, NameOnRent, AllocatedDate, ExpiryDate, RentDuration, AllocationSize, WaitingList)
    Individual(IndividualID, Fname, Lname, Address, DOB, Gender)

    This is to draw an Entity Relationship Modelling Diagram
    NOTHING involving Oracle exists in problem or solution.
    Problem can apply to any RDBMS.
    BTW, we don't do homework assignments.

  • I am sure there's a simple answer to this newbie question

    Hi group,
    I am trying to burn my movie for my DVD Player.
    I am using PAL format.
    I edit the movie in Pinnacle Studio.
    I imported it into Encore.
    I try to burn a project 1.8 Gigas in Size and no problem
    I try to burn a project 2.0 or greater and it won't work!!!
    I am using DVD R/W
    I am sure there's no problem with the DVD Burner because I am able to
    burn a DVD movie using Nero onto a DVD R disc and no problem.
    My Burning speed is 1X.
    I have a machine built for editing: 2 giga of memory/ A8N-SLI premium
    Mother board / AMD 4200+ processor / 700 gigas of hard disk, etc
    How do I solve this problem?
    Thanks in advance for any help.

    I am using MPG 2 as a source for my movie.
    It won't work means that I appear to burn it successfully but when I go to the DVD player, it movie skip, drags after about half way through.
    If I burn the smaller sized file It will play well throughout but I need
    a 3.5+ capacity.
    Thank you.

  • I hope you know the answer for this "easy" question

    I created a package for my JSP and import it to be used in a JSP. It works great, but for some reason, it displays an error message saying it can't find the class in import. Can anyone explain that? Thanks.
    null

    Have you "registered" the class in the JServ.conf file in the JServ directory under the Apache install? The JServ engine will not know where to find the class that you want if it is not in any of the paths that were set up suring the install (CLASS_PATH environment variable). To register a class, look in the file for directives named wrapper.classpath= . Add the jar file that contains the class that you wish to use. This should fix your problem.

  • Sorry for a struts question

    Currently I have a list of objects in a hashtable
    In the JSp I itereate over them using struts taglib and display the appropriate content. The problem is with checkboxes that I need to display. I am unable to get the right value for the checkboxes even if everything is indexed during the iteration. I donot know how to rest a checkbox field in the ActionForms reset() method which resides in a hashtable holding a list of objects
    e.g
    myHashtable[3]
    |------------> ob[0] -> chcekbox field
    |------------> ob[1] -> chcekbox field
    |------------> ob[2] -> chcekbox field
    a similar structure

    1.jsp
    <logic:iterate name="MyForm" id="hashtable"
                   property="hashCollection">
    <td>
    <html:checkbox name="hashtable" property="myCheckBox" indexed="true" value="true"/>                                   
    </td>
    </logic:iterate>
    2. ActionForm(MyForm)
    private Hashtable hashtable;
    public Object getHashtable(int index)
    return this.hashtable.values().toArray()[index];
    public Collection getHashCollection()
    return hashtable.values();
    hashtable is a collection of objects of which myCheckBox is an element
    Now even if I select the checkbox on Jsp , it never really sets the actual value in the object. Any possible solutions or workarounds?

Maybe you are looking for

  • Help uninstalling Adobe Premiere Elements 1.0 Error 1402.???

    have my movie done ready to burn dvd have had premiere elements 1.0 for 4 years on my dell E1705 windows xp media edition 2005 computer has recently had some problem... freezes up that was triggered in the DVD burning process so i uninstalled and the

  • Slow response time for JSP pages under iAS 6.0 SP4

    Hi, I got an application deployed on iplanet app server 6.0 SP4 on solaris 2.8. Using a single kjs engine and lite sessions. kjs memory size is min 256 and max 256 megs. but verbose:gc shows memory is 98% free. when i restart the app server, all JSP

  • DV PAL to Uncompressed 10 Bit

    Hi, I have a 23 minute DV-PAL timeline. This is the final timeline which includes color correction, filters and the works. I need to upgrade this to uncompressed 10 bit. I have tried using the media manager to create an offline sequence which can be

  • Review/Learn Oracle Admin And SQL Basics

    Hello , www.oraclecoach.com has some great free training videos on SQL and Oracle Administration. Great tool for review or learning SQL and Oracle Administration. Regards.

  • ASUS P8Z68-V PRO/GEN3: bluetooth

    Hello, The ASUS P8Z68-V PRO/GEN3 motherboard for desktop PC's has bluetooth on it. However, I tried to follow steps from https://wiki.archlinux.org/index.php/Bluetooth, such as: -installing bluez with pacman -starting dbus and bluetooth daemon -insta