Can the text index do it for me?

Hi all,
I have the following requirements und question to oracle text index:
I have saved in the VARCHAR2 column some strings:
CREATE TABLE t1
(STR VARCHAR2(200));
INSERT INTO t1 (STR)
VALUES ('Abcd');
INSERT INTO t1 (STR)
VALUES ('abcd');
INSERT INTO t1 (STR)
VALUES ('Aabcd');
INSERT INTO t1 (STR)
VALUES ('Abcd-ef');
INSERT INTO t1 (STR)
VALUES ('Abcd ef');
INSERT INTO t1 (STR)
VALUES ('Abcd - ef');
INSERT INTO t1 (STR)
VALUES ('Abcd - 12');
INSERT INTO t1 (STR)
VALUES ('Abcd_ef12');
INSERT INTO t1 (STR)
VALUES ('Abcdef');
INSERT INTO t1 (STR)
VALUES ('Abcdgh');
INSERT INTO t1 (STR)
VALUES ('Abcdij');
INSERT INTO t1 (STR)
VALUES ('Abcdklmnop');
COMMIT;Then I create a text index with the following script:
BEGIN
  CTX_DDL.CREATE_PREFERENCE('SUBSTR_PREF','BASIC_WORDLIST');
  CTX_DDL.SET_ATTRIBUTE('SUBSTR_PREF','SUBSTRING_INDEX','TRUE');
  CTX_DDL.CREATE_PREFERENCE('pj_lex', 'BASIC_LEXER');
  CTX_DDL.SET_ATTRIBUTE('pj_lex', 'PRINTJOINS', '-');
  CTX_DDL.CREATE_PREFERENCE('mcds_t1_str', 'MULTI_COLUMN_DATASTORE');
  CTX_DDL.SET_ATTRIBUTE('mcds_t1_str', 'COLUMNS', '''XZX''||STR');
END;
CREATE INDEX IDX_T1_STR ON T1
(STR)
INDEXTYPE IS CTXSYS.CONTEXT
PARAMETERS('wordlist  SUBSTRING_PREF
            LEXER     pj_lex
            DATASTORE mcds_t1_str
            memory    50m')
NOPARALLEL;My requirements are: when I search for "abcd" (WHERE contains (STR, 'XZX'||:var1||'%') > 0):
I should get: Abcd, abcd, Abcd-ef, Abcd ef, Abcd - ef, Abcd - 12, Abcd_ef12, but not Abcdef*, Abcdgh*,*Abcdij*, Abcdklmnop*, Aabcd*
The found text should start with "abcd" (case insensitive), after "abcd" it should have 1 or more characters which start with blank, "-", "_", or some other special character, but should not start with a letter!
Is it possible to achieve it with oracle text index?
Regards

You must define the hypen etc. as SKIPJOINS not as PRINTJOINS.
BTW your create index skript fails due to wrong parameter name.
BEGIN
  CTX_DDL.CREATE_PREFERENCE('SUBSTR_PREF','BASIC_WORDLIST');
  CTX_DDL.SET_ATTRIBUTE('SUBSTR_PREF','SUBSTRING_INDEX','TRUE');
  CTX_DDL.CREATE_PREFERENCE('pj_lex', 'BASIC_LEXER');
  CTX_DDL.SET_ATTRIBUTE('pj_lex', 'SKIPJOINS', '-');
END;
CREATE INDEX IDX_T1_STR ON T1
(STR)
INDEXTYPE IS CTXSYS.CONTEXT
PARAMETERS('wordlist  SUBSTR_PREF
            LEXER     pj_lex'
select *
from t1
where
contains (str, 'abcd') > 0
STR
Abcd ef
Abcd
abcd
Abcd - ef
Abcd - 12
Abcd_ef12 Edited by: chris227 on 06.03.2013 00:58
Example added

Similar Messages

  • Where can I get the Text to Speech utility for Captivate 4?

    I looked all over the Adobe site. Where can I find the text to Speech utility for Captivate 4 and the voices that go with it. A URL to the download site would be perfect.

    It has been discuss a few posts down to your recently, as indicated correctly by Micheal.
    http://forums.adobe.com/thread/944601?tstart=0
    Thanks,
    Anjaneai

  • Oracle text installed but can't find anything through the text indexes

    Hello,
    i've got a Oracle 10G (10.2.0.4) database 64bit on a Windows 2003r2 64bit (sp2). I also installed the Oracle Text:
    Oracle Text
    VALID 10.2.0.4.0
    then I created some preferences and created the text indexes:
    create index afindex on docs(document) indextype is ctxsys.context parameters('storage gdoc_store SYNC (ON COMMIT)');
    so with the syn on commit, it should immediately be seen in the index.
    I have for example in 1 table 6 documents (word,pdf ...), the other has more then 64000 documents and the 3rd one more than 425000.
    In none of the 3 above, searching on text gives result after index is created. Not in the developer his program nor in sqlplus.
    searching sql for example:
    select id from docs where contains(doc,'hello')>0;
    under the c:\windows\temp, I see about 380files with drgibXXXXX, so it does index them?
    What could be the problem?
    note that I've got lots of other database where I also use Oracle text and there is no problem, only difference is the 32 <-> 64bit.
    error in ctx_index_error is :
    DRG-11207: user filter command exited with status 1
    Edited by: user12155961 on 15-apr-2010 5:33

    According to the [http://download.oracle.com/docs/cd/B19306_01/text.102/b14218/afilsupt.htm#sthref2446|10.2 docs], Auto Filter is supported on the following platforms:
    Microsoft Windows
    o Server 2003 (x86 and IA-64)
    o XP (Service Packs 1 and 2)
    o 2000 x86 (Service Pack 2)
    o NT 4.0 x86 (Intel) (Service Pack 6a)
    Sun Solaris 8.0 and 9.0
    HP-UX 11.0 and 11i, PA-RISC
    HP-UX 11i v11.23, IA-64
    IBM AIX 5.1 and 5.2L
    Red Hat Linux 7.3 and 8.0
    Red Hat Enterprise Linux AS 2.1 and 3.0 (x86)
    Red Hat Enterprise Linux AS 3.0 (IA-64)
    SuSE Linux Standard Server 8 (x86)
    Note x84 and IA-64 (Itanium 64) but not x86-64. So I suspect that you don't get the filters at all.
    If this is the case, your options are either to install a 32 bit version of Oracle for Windows (which I believe should work fine on 64 bit Windows) or to attempt to cobble the 32 bit ctxhx into your 64 bit environment. I'm sure this should be possible, but it would be unsupported and I don't have any kind of "how to" on doing it.

  • ERROR while syncing the Text Index

    Hi All,
    We are facing an issue while syncing the text index on the table, and the error is below,
    System error: Plsql job execution is failed with error code -20000 and error message ORA-20000: Oracle Text error: DRG-10017: you must be CTXSYS to do this: SYNC
    We have granted the USER with CTXAPP and CTXSYS roles.
    We are scheduling the SYNC from the QUARTZ Scheduler and it happens for every 5 Minutes. We are getting this error in ADHOC Basis.
    Could anyone help us in solving the issue.
    Thanks.

    Hi
    to be able to run ctx_ddl.sync_index as a database job it is necessary to have explicit grants for ctx_ddl, the inheritance via the role ctxapp does not suffice.
    SQL> grant execute on ctxsys.ctx_ddl to <user_submitting_the_job>;
    -Edwin

  • Can the H-Squared Air Mount for AirPort Extreme be mounted horizontally on a wall withOUT the Horizontal Adapter?

    Can the H-Squared Air Mount for the Airport Extreme Base Stataion (5th Generation) be mounted horizontally on a wall withOUT also having to buy the Horizontal Adapter (which costs another $14.95)?
    Are there mounting holes in the Air Mount to allow for that?

    Can the H-Squared Air Mount for the Airport Extreme Base Stataion (5th Generation) be mounted horizontally on a wall withOUT also having to buy the Horizontal Adapter (which costs another $14.95)?
    Yes, if you wanted to use a couple of L brackets, you could do this. The chances of the pre-drilled holes in the L brakets  lining up with the pre-drilled holes in the Air Mount are open to question, though. So, you may need to some drilling.
    I suppose you could design your own horizonatal adapter out of wood, but once you did that, you might as well use another piece of wood for the top shelf. Then, you don't need the Air Mount at all.
    Are there mounting holes in the Air Mount to allow for that?
    The Air Mount has a dozen, maybe more pre-drilled holes. As you might imagine, the Horizontal Adapter mates perfectly with the Air Mount.  The picture in the link below will give you a good idea.
    http://h-sq.com/products/airmount/index.html

  • On Apple TV. Can the USB port be used for a keyboard and mouse interface

    On Apple TV. Can the USB port be used for a keyboard and mouse interface

    A bluetooth keyboard can be used with the Apple TV.
    There is no need for a mouse with an ATV.

  • Can the next version please allow for the line height to be zero in a text box? I can only go down to .01?

    I want to create a flipping calendar. I had this brilliant idea of putting each date 01 02 03, etc in one text box, with a hard return in between, and then set the line height to zero. Then set the type to appear one paragraph at a time. It would eliminate 20 animation steps. It worked beautifully except that I can't get the line height to set to zero. It will only go to .01. Bleh!
    So please, Can the next version allow for the line height to be zero in a text box?
    Also, separate timelines would be nice instead of one long string so it would be easier to have more than one animation happening at once.
    Just a thought.
    PS - I also noticed it would be nice to have the option of having the first line in a text box dissappear or dissolve or flip out before the next one comes in, rather than just each building in on top of each other.

    In these forums you are just talking to users, not developers. To provide your feedback, in Keynote go to Keynote Menu>Provide Keynote Feedback and send your request that way.

  • Partitioning the Text Index

    Hi,
    I need to know the possibility of partitioning the oracle text index which is already been built.
    Could anyone post some sample code for that?
    Thanks in advance.

    I thought there might be a problem with DETAIL_DATASTORE and partitioning, but it seems to work fine for me.
    Are your tables range partitioned? See the testcase below, and see if you can modify it to produce the error you're seeing.
    drop table pt2;
    drop table pt1;
    create table pt1 (
      id number   primary key,
      part_key    number,
      dummy       varchar2(1))
    partition by range (part_key)
    ( partition p1 values less than (2),
      partition p2 values less than (maxvalue)
    create table pt2 (
      id          number primary key,
      part_key    number,
      fk          number,
      line_number number,
      text        varchar2(80),
      constraint  pt2fkc foreign key (fk) references pt1(id) )
    partition by range (part_key)
    ( partition p1 values less than (2),
      partition p2 values less than (maxvalue)
    insert into pt1 values (1, 1, 'x');
    insert into pt1 values (2, 2, 'x');
    insert into pt2 values (1, 1, 1, 1, 'the quick brown fox ');
    insert into pt2 values (2, 1, 1, 2, 'jumps over the lazy dog');
    insert into pt2 values (3, 2, 2, 1, 'now is the time for all good men ');
    insert into pt2 values (4, 2, 2, 2, 'to come to the aid of the party');
    exec ctx_ddl.drop_preference  ('mymd')
    exec ctx_ddl.create_preference('mymd', 'DETAIL_DATASTORE')
    exec ctx_ddl.set_attribute    ('mymd', 'DETAIL_TABLE', 'PT2')
    exec ctx_ddl.set_attribute    ('mymd', 'DETAIL_KEY',   'FK')
    exec ctx_ddl.set_attribute    ('mymd', 'DETAIL_TEXT',  'TEXT')
    exec ctx_ddl.set_attribute    ('mymd', 'DETAIL_LINENO','LINE_NUMBER')
    create index pt_index on pt1 (dummy) indextype is ctxsys.context
    parameters ('datastore mymd')
    local
    /I'm testing on 11.2.0.2. If this testcase gives you an error on an earlier version, it must be a bug that has been fixed.
    Roger

  • How do I change the text on a label for a SAP delivered WD view

    Hi,
    I need to change the text that is being displayed for a label in a SAP delivered WD ABAP View. When I look at the properties for this label, the Text property is currently empty, so I assume that the text that is being displayed in the view is coming from the dictionary. I was hoping to change the text of the label via the Enhancement Framework. I created an OTR entry, then went into SE80 for the WD Component, I navigated to the view in question, I pressed the Enhance button and entered $OTR:<package>/<alias name> in the text property for the label. Finally I saved and activated and was prompted to create an Enhancement Implementation, which I did and I selected it. Everything seems to be fine (no errors or warnings). I then ran the WD application. My change was not there. I then went back into SE80 for the WD Component that I created the enhancement. I navigated to the View and looked in the text property of the label and saw that my change was not there. I repeated this process several times and each time when I added the OTR entry to the text property of the label, it saves and activates without issue (in enhancement mode), but when I run the WD App the change does not show up and when I go back to the WD View, my change to the text property is gone. I know that if I really wanted to I could register the object and add the OTR entry to the text attribute of the label, but I am trying to perform this change using a modification free enhancement. Can this be done via an Enhancement, or do I have to register the object and make my change using a modification?

    Hi Gregg,
    excellent question. I had the same problem as well before.
    What I have learned is that you cannot change a UI Element via Enhancements.
    You can add new UI Elements (e.g. new label) or remove existing elements, but you cannot change them (except the layout properties (e.g. colspan) maybe).
    The only possibilities I see is
    1. Remove the existing label, and add a new label with your desired text
    2. Do it as a modification
    3. Do it as a configuration (This means you go to the webdynpro application in SE80, right click and select "Create/Change Configuration)
    4. Do it as customizing (This means you add the URL parameter sap-config-mode=X to the URL, navigate to the label, right click on it, and select "Change Settings for Current Configuration").
    The disadvatages of 3) and 4) are
    - texts in configurations and customizing are not translatable (as far as I know)
    - if you have multiple configurations, you have to change the label multiple times
    Hope this helps a bit,
    Daniel

  • Can the text wrap tool options be reinstated?

    I may have inadvertenly hit some keyboard code to remove the options, though I certainly don't remember doing so. There are no options displayed at all, only a box that can be checked or unchecked to use the text wrap on the master pages only. I have tried it both ways, and checked the master pages for possible boxes, but there is nothing. Has anyone else ever encountered this? I appreciate your help! Thanks so much -

    What version of ID are you using? What OS?
    Your description is a littel vague but it sounds like you've opened the Text Wrap panel flyout menu and all you see is the option to limit wrap on a master page object to other text on the master page. Is the panel itself blank?
    If that's the case, see Replace Your Preferences

  • Can the text in the header row be slanted?

    In Excel the text in the header row can be slanted at an angle in order to show a long header text in a narrow column. Can this be done in Numbers?

    John,
    Numbers doesn't support this directly. A quick way to fake it is to make a chart with slanted category axis labels. This won't give you slanted cell borders, but then you didn't ask for that.
    These particular instructions have an advantage over just pasting text boxes over the cells in that the same text is in the cell as in the label pasted over the cell. This may be helpful if you want to reference a header cell's content in an expression.
    Jerry

  • Outside of zoom, is there a way to make the text under icons larger for elderly use of iPad?

    We gave my mom an ipad mini, but the text under the icons is barely readable for the elderly.  The accessibility options increase the size of contacts, email, etc, and the zoom gives an option to increase, but that is not user friendly for the elderly - 3 finger tap on/off??? Really????  For a senior with arthritis?
    Does anyone know a way to increase the size of the text of the icons on the ipad? 
    Thanks for any insights.

    Try After Effects, it's perfect for keying stroke and all text characteristics.
    Here's an example

  • Can the text on toolbar buttons be changed?

    In my Customize Toolbar window, I have it set to show toolbar buttons - such as Back/Forward, New Tab, Home - as Text. Is it possible to change the actual text that shows for these buttons, for example Bk/Fwd for "Back/Forward"?

    Yes, if your on iCloud you can go into the calendar application and tap the calendars button. Then tap Edit, [Name of Calendar], then tap which colour. If you using any other client [Gmail, Exchange etc] you can go onto the change the colour online.

  • Can the IMAQ 1424 be configured for other digital cameras?

    I hope the answer is yes! Because when I read:
    �Compatible with Cohu, Dalsa, Hamamatsu, Kodak, and Pulnix cameras�
    I didn�t take that to mean
    �ONLY COMPATIBLE with Cohu, Dalsa, Hamamatsu, Kodak, and Pulnix cameras�
    That is to say I was operating under the impression that you could configure the IMAQ 1424 to work with other cameras, as long as you have all the pertinent information of said camera. What worries me is on my initial attempt in the IMAQ software it says that the option to configure a camera only works for non-digital card/cameras. I haven�t got into the software and hardware in great detail yet, maybe I will find that this is a non-issue but I just thought I would ask,
    in that if the answer is no I wont waste anymore time. So, if I can configure the 1424 to work with �OTHER� cameras, can someone point me in the right direction? Thanks a 10^6
    Grant

    Grant,
    Yes, it can be used with other cameras. The list of compatible cameras only includes the ones NI has already written configuration files for.
    For cameras not in the list, you need two things. You need a cable that will connect all the appropriate signals. This may require a terminal block or custom cable. You will also need an camera configuration file, that tells the camera how to read the video signal, how to react to different signals, etc. The main problem is that NI does not document the format of the configuration files, so it can be difficult to write your own. They are usually willing to help by writing the basic file, but you are on your own if you want to implement anything fancy. If you study other files, it isn't too difficult to figure
    out how to do it.
    I would contact NI and discuss the specific camera you are trying to connect to the 1424. If it is a common camera, they may already have the files or cables you need (or know where they can be found). If it is not a common camera, they can tell you what needs to be done and how difficult it will be to do.
    Bruce
    Bruce Ammons
    Ammons Engineering

  • Can the Battery Charger LC-E5 for EOS 500d be used in Asia? If not, what's an option?

    Am worried my Battery Charger LC-E5 for EOS 500d may not work with power sources in Asia. Can I safely plug
    it into wall sockets in Thailand to charge a bsttery? If not, what's an option?  many thanks, ec
    Solved!
    Go to Solution.

    I don't understand the tendency on here to repeat exactly what someone already said without providing any new information.
    I used my charger for the 450D in Indonesia, Singapore, Malaysia, Thailand, Cambodia, Laos, Vietnam, Hong Kong, and China.  Not to mention Europe, Africa, South America, Australia.  No problems.
    Pretty much any modern day electronic (not any electric, electronic) will run fine on either system.  Electronics run on DC current, so AC line supplies need to be rectified, smoothed, and downscaled to usually around 3.3 - 12V.  The components that do this can easily be made to handle a wide range of AC input, which is quite convenient.   I would always check the electronic or the transformer (the brick between the cords on a laptop charger) to be sure, but in general the only things that are going to have issue are simple non-electronic devices like electric shavers and curling irons. 

Maybe you are looking for

  • In app navigation not working for one office member

    We are in the process of laucnhing 4 new magazine apps for January. One of the members of our team is having issues with one specific action. At the bottom of each content folio, we place a button that says go to top. This button links you to the fir

  • PLease help me in wrirting this query

    Hi all, i want to write a query using standard emp table.But output required is like deptno ename 10 smith alen mark 20 ram hanuman Thus if deptno is same for some employees it should be printed once only Any help is highly appreciated

  • Cant attach photos to gmail

    first post here for me- i'm struggling to work out how to attach photos to to my composed gmail messages. I'm clicking on 'attach file' then 'choose file' but cant find any where amongst my documents, files and applications etc my photo libary from w

  • Connection refused!! analytics------ sawserver

    Hi I have installed the BIEE and deployed the analytic app. But when I go to the URL: http://localhost:7005/analytics, i obtain the following error: *500 Internal Server Error* when I lock the logs files i found this: ####<Mar 16, 2010 9:35:36 AM EDT

  • System Preferences ask me to move to iCloud but I'm already there. What's going on?

    Hello all, I'm a little confused. Every time I go to system preferences and select iCloud I get the pane which tells me to move my MobileMe account to iCloud. So every time I select it and it takes me to the mobileme page and onto the find my iphone