Oracle Text with Numbers

Hello,
I need to search in a number column for particular "subnumbers". For
example I have a column with 3453454 in it an I like to search e.g for the
number "53" in it. I know I could use
select * from table where number_column like '%53%'
but since the table is rather big I'd like to use Oracle Text for it to avoid a full table scan and query like
select * from table where contains(number_column, '53') > 0
but above query would return NULL after converting the number column
to a varchar2 column! Only full numbers are indexed and therefore only
a search on the full number 3453454 would yield a result. What are my
options to make above query with "contains" clause work?
Thanks in advance

You can configure Text to do substring searches.
Do this:
ctx_ddl.create_preference( 'SUBSTR_SUPPORT_PREF', 'basic_wordlist' );
ctx_ddl.set_attribute( 'SUBSTR_SUPPORT_PREF', 'SUBSTRING_INDEX', 'YES' );
Then you can do something like:
where contains(col,'%53%',1) > 0
Tom Best

Similar Messages

  • Oracle Text with Oracle TimesTen

    Hi!
    I'm trying to use Oracle Text with Oracle TimesTen In-Memory. In this customer, we are using Oracle Text to index the names of the company clients. There are about 13 million names to index. We're trying to speed up even more the search using Oracle TimesTen.
    Does anybody as any experience using simultanely this two technologies?
    Thanks in advance
    Tiago Soares

    TimesTen doesn't support the CONTEXT indextype or CONTAINS clause (or other domain indexes/operators), so you can't create Oracle Text indexes in it.

  • Oracle Text with Oracle Lite 10G?

    I would like to be able to perform text searches in my OLITE 10g R2 database. Is is possible to install Oracle Text for use with OLITE? If so, how to I install it -- do I use the manual procedure described elsewhere, by taking the script files from an Oracle Enterprise or Standard Edition installation, and running those scripts against my OLITE db? Thanks.
    Marty

    Marty,
    Did you ever resolve this issue? We would also like to run Oracle Text with OLite, but I cannot find any information on doing this.

  • Using Oracle Text with Apex

    Can someone point me to some resources on how to integrate Oracle Text and APEX to do searches, highlight results, etc (all the features of Oracle Text)?
    The data to be indexed is in files on the filesystem, so I would like to keep it that way and use the FILE_DATASTORE option for Text.
    Thanks for any pointers.
    Update: Yes, I did see http://www.oracle.com/technology/products/database/application_express/pdf/apex_text_application_v1.6.pdf
    but the search results there just returns the URL/file containing the "hit". It doesn't show the actual text fragment that caused the match, doesn't highlight it, etc. I am looking for a real Google-like search. Hm, having said that, I might as well use Google Desktop! Nah, where's the fun in that?

    This is a very simple application for my own use. It started life in 8i when there were fewer Text options.
    As such, it uses the query string as entered. This returns all of the matches:
    select msgid, msgdate, Box, fromaddr, subject
      from eudora.inbox
    where contains(body, :P703_MailSearch) > 0
    order by msgdate descI display the selected result like this:
    select subject,
      Replace(eudora.mmarkup(:P704_MSGID, :P702_SEARCH), Chr(13), '<BR>') Body
      from eudora.inbox
    where msgid = :P704_MSGIDIn a newer application, I experimented with the CTXCAT grammer.
    That query looks like this:
    select m.ID, m.pdpno, m.shortdesc
      from pdp_mast m
    where contains(m.dphistory, '<query><textquery lang="ENGLISH" grammar="CTXCAT">
                                             ' || :P1_Text || '
                                         </textquery>
                                      <score datatype="INTEGER"/>
                                  </query>') > 0     
        or contains(m.shortdesc, '<query><textquery lang="ENGLISH" grammar="CTXCAT">
                                             ' || :P1_Text || '
                                         </textquery>
                                      <score datatype="INTEGER"/>
                                  </query>') > 0As always, once you figure out the syntax, its easy to make it work in Apex.
    Text indexes are very fast. On my old 600MHz PC, searches in 250MB of text take less than a second.

  • Oracle Text with eBusiness Suite

    I'm trying to understand if Oracle eBusiness Suite uses Oracle Text for indexing certain queries such as item description, etc.. I was told that iStore uses it for searching on items. Is that true? Does the Oracle Apps standard Item form use it? Can it be set up for use with the apps? I know the query syntax is different (CONTAINS), and I don't see any non standard indexes on MTL_SYSTEM_ITEMS_B, so I'm not sure how I could implement the functionality in the apps. Please help!!!!

    Yes, Oracle Text is used in iStore Search Feature, Refer to code under $JAVA_TOP/oracle/apps/ibe/catalog/Search.java for an example, also look at table ibe_ct_imedia_search table and its indexes which gives an idea of how Oracle iStore is leveraging Oracle Test for Searching.
    get the data into a staging table and then create whichever index you want, dont modify the indexes on key tables like MTL_SYSTEM_ITEMS_B

  • Oracle Text with Hibernate & Spring.

    Hi,
    I am looking for some code samples of Oracle text based search using Hibernate & Spring. Can the three of these technologies be used in a J2EE application.
    --Irshad.                                                                                                                                                                                                                                                                                                                                                               

    TimesTen doesn't support the CONTEXT indextype or CONTAINS clause (or other domain indexes/operators), so you can't create Oracle Text indexes in it.

  • Oracle Text with User_DataStore is not working

    Hi Expert,
    Based on this url  : http://docs.oracle.com/cd/B28359_01/text.111/b28304/cdatadic.htm#i1006810
    I was trying to create an oracle text index , but i wasn't able to retrieve the data
    here are my scripts:
    create table articles(
        id       number,
        author   varchar2(80),
        title    varchar2(120),
        text     clob );
        create procedure myproc(rid in rowid, tlob in out clob nocopy) is
      begin
          for c1 in (select author, title, text from articles
                      where rowid = rid)
          loop
          dbms_lob.writeappend(tlob, length(c1.title), c1.title);
       dbms_lob.writeappend(tlob, length(c1.author), c1.author);
       dbms_lob.writeappend(tlob, length(c1.text), c1.text);
           end loop;
        end;
        begin
    ctx_ddl.create_preference('myud', 'user_datastore');
    ctx_ddl.set_attribute('myud', 'procedure', 'myproc');
    ctx_ddl.set_attribute('myud', 'output_type', 'CLOB');
    end;
        create index myindex2 on articles(text)
      indextype is ctxsys.context
      parameters ('DATASTORE myud'); 
          insert into articles(id,author,title)values (1,'A','AAAAAA');commit;
          insert into articles(id,author,title)values (2,'B','BBBBBB');commit;
          insert into articles(id,author,title)values (3,'C','CCCCCC');commit;
          insert into articles(id,author,title)values (4,'D','DDDDDD');commit;
          EXEC CTX_DDL.SYNC_INDEX('myindex2','2M');
          select * from articles where contains(text,'B',1)>0;  -- this display nothing.
    Can anybody help me?

    It's absolutly essential to get into the details of Oracle Text if it is used for more than pretty simple things.
    Query the index tables and view the tokens stored.
    Is there any token like 'B'?
    I guess no. Because your function constructs something other ...
    What do you get, if you try 'B%' instead of 'B'?

  • Using Oracle Text with CLOB field containing multiple languages

    I'm using Oracle 10g (NLS_CHARACTERSET is set to. AL32UTF8) and have a table with a CLOB field which is storing text written in either English and/or Simplified Chinese.
    The following index has been created on this field:
    CREATE INDEX text_index
    ON text_table(text_field)
    INDEXTYPE IS CTXSYS.CONTEXT
    PARAMETERS('FILTER CTXSYS.INSO_FILTER');
    I'm having issues in returning text which matches the Chinese text using the CONTAINS operator. For some reason the following query is returning rows which do not contain any Chinese text:
    SELECT *
    FROM text_table
    WHERE contains(text_field,'炫%') > 1;
    A newsgroup user advised me to produce an explain plan using ctx_query.explain.
    I created 2 explain plans, one which was searching the index for 'A%' and the other searching for the Simplified Chinese character '炫%'. The results for the first test were as expected whereby the values contained within the OBJECT_NAME field all began with the letter 'A'.
    The second test however produced somewhat unexpected results. The OBJECT_NAME field this time contained various words, both English and Simplified Chinese. I could be wrong but it appeared to store every individual word in the CLOB field. Both tests produced different EQUIVALENCE rows, the first test was:
    OPTIONS = Null
    OBJECT_NAME = A%
    Whereas the second test produced:
    OPTIONS = (?)
    OBJECT_NAME = %
    Am I right in thinking the Simplified Chinese character is for some reason being converted to a '?' character?
    Any help on this will be much appreciated.

    As you're not specifying a lexer to use, it will use the BASIC_LEXER, designed for space-separated European-type languages. This won't work effectively with Chinese.
    If you know which documents are Chinese and which are English, you can write this into a LANGUAGE column and use the MULTI_LEXER - this will allow you to specify BASIC_LEXER for the English texts, and CHINESE_LEXER or CHINESE_VGRAM_LEXER for the Chinese texts.
    If you don't know the language, you must use either WORLD_LEXER (10g) or AUTO_LEXER (11g). These lexers will automatically determine the language of the documents and index them appropriately. In general. MULTI_LEXER will be faster and more accurate than either of the automatic alternatives.
    When querying for Chinese characters you need to be very careful with your NLS_LANG settings. You need to make sure that the character set defined in NLS_LANG is the same as the character set from which you've pasted (or typed) the chinese characters.
    The "?" in output usually just means "I don't know how to translate this character into your output character set". Sometimes it may appear as a reversed question mark.

  • Using Oracle Text with MS WORD

    Hi,
    We have just installed Text and we want to use it for indexing hundreds of MS WORD documents that are in the same directory. But I could not find a document / example about indexing/filtering Word Documents. I will be grateful iy you can help me for finding these..
    Thanks..

    You could specify INSO_FILTER for FILTER preference
    in command for creating index
    (see
    http://otn.oracle.com/products/text/x/samples/indexing/filters/inso_filter/inso_filter_idx.sql) or
    use USER filter.
    For example see also
    http://otn.oracle.com/products/text/x/samples/indexing/filters/INSO_Filter/index.html
    (for loading data you could use any other tools than SQL*Loader)
    Regards, Victor.

  • Using Oracle Text for searching with UCM 10g

    I am using Oracle text with UCM 10gR3 and Site Studio 10gR4 and I am trying to sort the search results by relevancy and to also include a snippet of the retrieved document. I have the fields that the SS_GET_SEARCH_RESULTS service returns but the relevancy score is always equals 5 and the snippet contains characters such as &lt; idcnull, /p, etc., which you can see are XML/HTML/UCM tags but which result sin even more strangeness in the snippet if I try to remove them programmatically.
    I have read the Oracle Text documentation and there appear to be ways you can configure Oracle Text but I am not clear at all on what I can do from UCM. It looks like the configuration is either done in database tables or in the query itself, neither of which are readily configurable to me.
    Is anyone experienced in this or know of any documentation this might help?
    Bill

    Hi
    If I remember correctly then this issue was seen with an older version of OTS component and Core Update patch / bundle . Upgrade the UCM instance with the latest CS10gr35 update bundle patchset 6907073 and also upgrade OTS component from the same patchset .
    Let me know how it goes after this .
    Thanks
    Srinath

  • Oracle SID Problems with numbers

    Hi everybody,
    I created a new database (ORACLE 10g) with the SID name IC71 and the same global database name. After finishing the configuration and starting the database everything worked fine.
    Now I installed the Oracle Client on another server machine. I made an entry in the tnsnames.ora with the Servicename IC71 and it worked. The problem now is, that I have to give the SID instead of the Servicename for installing some software. With the SID IC71 it does not work, after I changed the SID to IC it works.
    Can someone explain me this strange settings? Has Oracle problems with numbers in the SID name?

    Has Oracle problems with numbers in the SID name?Not at all. I often use numbers in SIDs, and I've never had problems with that. Your problem has to be elsewhere.
    With the SID IC71 it does not workWhich error do you get ?

  • Oracle Text in installing Oracle 10g without licence!!

    Hi. Everyone.
    I've read some thread , but I am still confused about "oracle text".
    Now, I am testing oracle10g database.
    I downloaded 10g software from www.oracle.com, and installed it sucessfully
    on windows xp.
    When I was trying to import a dump file from oracle9i to
    the unlicenced oracle10g database, I got the error , IMP-00017, which
    is related to "Oracle Text".
    I checked "dba_users" dictionary, but ctxsys user is locked and expired.
    I read some thread on this site, and according to the advice, I tried to
    enable oracle text, using "DBCA".
    However, every database option on DBCA is disabled, I was not able to
    check oracle text.
    Lastly, how can I enable "Oracle Text" with unlicenced oracle 10g ?
    Is this possible without licence?
    I am very confused about this.
    I am looking forward to hear your experience and advices.
    Have a nice day.
    Best Regards.
    Ho.

    Well, instead of being confused, you could go to http://www.oracle.com/pls/db102/portal.portal_db?selected=1 and look at
    1) the licensing document, which would tell you whether you need a separate license, and
    2) under the 'Books' tab, look at the Text Application Developer's Guide or the Text Reference manuals for details.
    You could also look for the Oracle Text forum (from the http://forums.oracle.com page, under Database - More, or Text and ask the people who concentrate on that set of features.
    In general, Oracle Text is a set of extensions, the definitions for which are stored under user ctxsys. You would use these extensions by creating your own objects that are based on the extensions.
    For example, suppose your tables contain varchar2 columns. Create indexes that are based on ctxsys's 'context index type' and your application can then use the 'CONTAINS' keyword search capability (which is effectively a ctxsys-owned extension to the select)
    However, you would never log on to ctxsys and do anythibng with that as you risk changing the template code that Oracle has supplied.
    Message was edited by:
    Hans Forbrich
    PS: Yes, Oracle Text is included as part of the base database. Most of it is even included in the free Oracle XE database.

  • Highlite oracle text search terms

    I have a report that I set up using the instructions for Oracle Text Application in APEX. It works very well however I have the actual document as a link and I would like the search terms highlighted in the actual document. Is there a way to do that in APEX?
    I use this Region Source:
    select score(1) relevance, filename, dbms_lob.getlength("DOCUMENT") Document, code_id
    from documents
    where contains (document, :P10_SEARCH, 1) > 0
    order by 1 desc
    I read something about using ctx_doc.snippet to highlight but can get that to work.
    Any suggestions or can APEX highlight terms when the actual document is used?

    '8265490,
    Take a look at the ctx_doc.markup procedure. I think it will do what you want.
    http://download.oracle.com/docs/cd/B19306_01/text.102/b14217/view.htm#sthref599
    My home server is on a moving truck, so I can only point you to some old forum posts for examples:
    Re: Using Oracle Text with Apex
    Re: Use apex to display email
    Doug

  • Document management system using oracle text

    i plan to create document management system using oracle text with following features
    1) document comparision
    2) document search
    and more...
    can oracle text be used to display documents of various formats by converting them to HTML. and can search keywords be highlighted in the document.
    please help!

    Have you ever considered doing this in Oracle Application Express (free on top of the Oracle database)? How about something like:
    http://download-west.oracle.com/docs/cd/B31036_01/doc/appdev.22/b28839/up_dn_files.htm
    Index the files using the CONTEXT index, and perhaps the docs' meta with it using the Oracle Text MULTI_COLUMN_DATASTORE, and then when you write your query for a report on the documents include a search string.
    I've created a number of APEX-based document management systems and it is quite easy once you get the hang of using this environment. I suggest looking at some of the tutorials/how-to documents and you'll be on your way quickly.
    Start with the upload application. Once you can get your documents in, create a report that shows everything except the document. Verify all of this works correctly.
    Add some "items" to the page for the report, and include them as bind variables in the where clause.
    After that, add your Oracle Text index to the database, and toss in a "text-field" item to the APEX page. Modify your report query, adding the CONTAINS clause, and use the newly created item as a bind variable. There's your keyword search.
    Linking to Oracle Apps is done through API's and may be over database links.
    Hope it helps. Though not a step-by-step how to document, this should point you in the right direction. Get familiar with APEX as that covers most of what you described.
    -Ron

  • Oracle Text and Real Application Clusters

    Hello,
    i know, its a simple question but i found no one, who can answer.
    We want to use Oracle Text in combination with a 2-Node-ORAC-System.
    Is this possibe. And if it is, do I have to do a special configuration job. Are there any differences betwenn usind Oracle Text in an normal and in an ORAC Enviroment?
    Thank you and best Regards from Berlin
    M. Wuttke

    It is possible to use Oracle Text with RAC.
    And if it is, do I have to do a special configuration job. Are there any differences betwenn usind Oracle Text in an normal and in an ORAC Enviroment? I'll get back to you with more information about this later.

Maybe you are looking for

  • Auto update waveform chart error

    Hi all! I have come across the problem when working on my VI. As you can see from the VI that I have attached, there is a waveform graph on the front panel for data acquisition. The value shown right now is from time, 00:00:00 to 00:05:00 (0-5minutes

  • "Lost my Iphone" - Device Offline (STOLEN)

    Hi, My sister has had her Iphone 4 stolen, however, when trying to trace it using "find my iphone" in icloud the device is showing as offline.  The phone has a lock on it and "Find My Iphone" was 100% enabled. The phone isnt turned off as we can stil

  • How do I fix my photosop when is says that it could not load FastCore Routines module because the file was not found?

    Every time I try to turn on Photoshop a pop up shows up and says "Could not load the FastCore Routines module because the file was not found." How do I fix this?@

  • Convert from int to byte in JavaScript

    I have a small piece of code in Java, int x = 216; System.out.println((byte)x); I'd like to convert this to JavaScript form and that means, I want to be able to get the exact answer from this code which is -40. How do I do that?

  • Open Files in Native Version not Newest

    Is there a way in OSX that I can specify that a CS2 file be opened in CS2 and not in the newest version of CS3. I have been having issues with operators double clicking files and opening said file in the newest version when in all actuality it was cr