Oracle Text and Java (jsp)

Hi,
I stored files( pdf,word) in blob column. I created index (INSO_FILTER) and i would like to query the files.
String sword="test";
String query = "Select COMPID,CREATED,NAME,CVNUMBER from COMPANYCV" + " where contains(CV,' "+sword+" ') > 0 " ;
System.out.println(query);
ResultSet rs = stmt.executeQuery(query);
works fine i get the compid,date,number and filename of the stored file in the blob column. This info is displayed als a link(url). ie. <A HREF="ShowCv.jsp?NAME=doc1.pdf...... So when the user clicks on it, the appropriate program opens (word,acrobat reader) and the content of the file is shown.
But i also want to know how many times the word test" is found in each of the documents? How can i do this in java (jsp)?
And i want to highlight to word that is searched for in the document? Any help on doing this ( examples)? The doc should open in the browswer( html -version) and words
should be highlighted.
plz help!
ps.
if i use:
select score(1),NAME,COMPID from COMPANYCV where contains(CV, 'BLOB',1 ) > 0 order by score(1) desc
i get:
100,Test2.doc,4
39,Test1.doc,5
the score is 39 with Test1.doc! But the word blob is not present in that document. What does the "score" realy mean?
thx

ok so far so good. Here is what i did;
filter-> html
I created a table filterresult:
query_id number
document clob
in sql:
begin
ctx_doc.filter('cvindex', 30, 'filterresult',0,FALSE);
end;
so now the word document with pk=30 is stored in de blob column as html.
in my jsp i call:
String sql= "SELECT DOCUMENT FROM FILTERRESULT WHERE QUERY_ID=0";
//System.out.println(sql);
rs = stmt.executeQuery(sql);
while(rs.next()){
clob=((OracleResultSet)rs).getCLOB(1);
is=clob.getAsciiStream();
int pos=0;
int length=0;
byte[] b = new byte[clob.getChunkSize()];
while((length=is.read(b))!= -1){
pos+=length;
os.write(b);
and the word document shows up in html in my browser!
I created another table:
table highlightresults(
query_id number
offset number
length number
highlight->
in sql:
begin
ctx_doc.highlight('cvindex', 30, 'steven','highlightresults');
end;
i want to highlight the word "steven" in the word doc with pk=30.
I got no error on excecuting this, but how do i combine the 2 thins: how can i open the filtered word document (html) with the highlights shown in a color??
plz help!
also; can someone give me and exampple on how to call these sql statements, like:"begin
ctx_doc.highlight('cvindex', 30, 'steven','highlightresults');
end; " in my JSP (java) page!
thank you

Similar Messages

  • Oracle Text and Workspace Manager

    Has anybody incoroporated Workspace Manager and Oracle text together. How is the Oracle Text index handled? Can users in different workspaces submit documents, have them indexed and be the only ones to see those documents?

    Hi,
    I do not have much experience with Oracle text, and am unsure exactly how it works. As such, I would suggest to file a TAR requesting this information.
    Regards,
    Ben

  • Oracle Text and Custom item type

    I have a custom item type defined that has custom attributes. With Oracle Text disabled, I can use a custom search to find these items either by their standard attributes (name,description, etc.) or their custom attributes. However, as soon as I enable Oracle Text (and allow the indexing process to complete), I can no longer locate these items in a search.
    I assume that I need to do something to tell Oracle Text to index these types of items, but could not find anything in documentation. Any assistance would be appreciated.
    Also, assuming we get around the above issue, if I have Oracle Text enabled, does this mean I will not be able to find these items after they are created until the next scheduled index update? Is there away around this besides killing Oracle Text?
    Rgds/Mark M.
    Portal 9.0.2.6

    The indexes need to be synchronised for the items to be searched and returned. Hence until the next scheduled index update, the item will not be returned. To explicitly udpate the indexes, run the procedure in the portal database connected as the schema owner.
    SQL> exec wwv_context.sync();

  • Oracle Text and TREC

    Hello,
    I am new to SQL, Oracle, and Oracle Text and need to use Oracle Text to index about 2GB of files (located on the filesystem), each of which contain multiple documents. These documents are all in SGML format with the relevant data I need being inbetween DOCNO and TEXT tags.
    So far I understand I need to create a table similar to the following...
    create table "DocTable" ("Docno" number, "Text" text)
    ...and then either use a CONTEXT or CTXCAT index, but im not sure which.
    In general im not too sure what to do. Any help is appreciated.
    Thanks :)

    it actually depends upon what u r searching for
    A file datastore is works as below
    1) a location where all your files are stored - say /mydocs
    so you need to create a preference
    begin
    ctx_ddl.create_preference('COMMON_DIR','FILE_DATASTORE');
    ctx_ddl.set_attribute('COMMON_DIR','PATH','/mydocs');
    end;
    now create a table where you list down all the file names, the doc id is something for your reference. This can be any number which you prefer. But has to be unique, as this a pkey.
    create table mytable(id number primary key, docs varchar2(2000));
    insert into mytable values(111555,'first.txt');
    insert into mytable values(111556,'second.txt');
    commit;
    Now indexing, which ctaully fetches the documents from the file location
    create index myindex on mytable(docs)
    indextype is ctxsys.context
    parameters ('datastore COMMON_DIR');
    now the queries on the table will be using CONTAINS operator - as you have created a CONTEXT index.
    So , you need to fist determine what kind of queries you need to make. On the basis of that you can create the index.

  • Oracle.exe and java.exe are running my CPU 100% under XP Prof SP3

    11gR1
    oracle.exe and java.exe are running 100% CPU
    I have increased virtual memory to 4 gig
    I have defragmented the drive.
    I checked the drive for errors.
    I am searching the whole drive for viruses
    I do not have the problem with Redhat Fedora 12 running 11gR1
    I have 1 gig of RAM but cannot install release 2 because the installer expects
    1 gig + 1

    ooops!!! left that off...sorry
    XP Prof SP3 32 bit..*.no problem with Redhat Fedora 12 running MySQL and 11gR1*
    1 gig RAM Dell precision W/S 1.5 Gig rate 74 GiG SCSI HD 15000 RPM
    Don't pass out but I am also running MySQL server 5.1.41 and MS SQL Server Express 2008.
    Lucky it didn't catch fire
    I installed XP prof months ago but this CPU domination occurred only starting last night!
    However slow everything works in 11gR1
    sqlplus myname/password and then select rows from table
    sqldeveloper
    PHP web sites
    I've had plenty of trouble with Java running slow and hogging memory!
    Edited by: landonmkelsey on May 2, 2010 12:21 PM
    Edited by: landonmkelsey on May 2, 2010 12:24 PM
    Let me guess...stop services for MySQL and MS SQL Server and see what happens!
    Edited by: landonmkelsey on May 2, 2010 12:26 PM

  • Manual Install of Oracle Text and XDB for 11g

    I can't find the Metalink manual install docs for Oracle Text and XDB. For unknown reasons the DB was created with out them. I see the docs for 9i and 10g, but not 11g.
    Thanks!

    Hi,
    I think you are in APEX forum.
    This question seems more suitable for installation forum: Database Installation
    Also, please see if this thread helps: How do I install ORACLE TEXT
    Ta,
    Trent

  • Few people are "Oracle ACE" and "Java Champion"

    Few people are "Oracle ACE" and "Java Champion"
    What's whose icon ?:|
    I think that icon should not be only one.
    For instance,I am Pro (I have 570 points) and "Oracle ACE".
    Therefore I hope that My icons are "Pro" and "Oracle ACE".

    BluShadow wrote:
    can't you create an icon with the Java character holding an Ace?It reminds me of award icons (achievements) one gets on Steam and Xbox Live. My favourite - the award of getting a fair number of WW2 tank commanders that pop head-out-of-turret, as an infantry rifleman (with a puny bolt action rifle). Satisfaction getting the commander of a crew that that hides inside the belly of an armoured beast, that tries to turn my comrades and me into roadkill or a 1000 pieces exploding bits (or pixels to be more accurate)... ;-)
    One option here could be a signature line - that lay bares one's claim to fame, knowledge and experience. This is often standardise by community agreement on some web forums (the gamer ones often include clan tags and titles with h/w specs). Or something like GeekCode.
    Never really fancied that myself - but it could be fun putting an Oracle based geekcode together. ;-)

  • Oracle Linux and Java 7u10

    Hi all,
    I installed Oracle Linux Server 6.3 selecting "software Development System" (java 1.6.0 comes with it).
    but I need to use Java 1.7
    So I downloaded jdk-7u10-linux-x64.rpm
    when I try to install it, I get the following error.
    Unpacking JAR files...
         rt.jar...
    Error: Could not open input file: /usr/java/jre1.7.0_10/lib/rt.pack
         jsse.jar...
    Error: Could not open input file: /usr/java/jre1.7.0_10/lib/jsse.pack
         charsets.jar...
    Error: Could not open input file: /usr/java/jre1.7.0_10/lib/charsets.pack
         localedata.jar...
    Error: Could not open input file: /usr/java/jre1.7.0_10/lib/ext/localedata.pack
    I can't uninstall java 1.6 because other rpm uses it.
    Can someone tell me what the "proper" way to install Oracle Linux and Java 1.7 should be?
    OR is there a Oracle Linux Server 6.4 coming out soon with Java 1.7 as its default package set ;-)
    thanks in advance,
    c.w.

    You can ignore the errors. The files named in the error lines do not exist in the rpm package, but are there as .jar files
    The following works under Oracle Linux 6.3 x86_64 (and probably other versions).
    1. Open the following URL in a web browser on your PC:
    <pre>
    http://www.oracle.com/technetwork/java/javase/downloads/index.html
    </pre>
    2. Click the JDK download button, accept the license agreement and download the JDE rpm package.
    3. Copy the following file to your Oracle Linux server (SFTP):
    <pre>
    jdk-7u10-linux-x64.rpm
    </pre>
    4. Login as root and use the YUM utility to install the RPM package.
    <pre>
    # yum install ./jdk-7u10-linux-x64.rpm
    </pre>
    5. Register the new installed java version, then change your default Java:
    <pre>
    # alternatives --install /usr/bin/java java /usr/java/jdk1.7.0_10/bin/java 2
    # alternatives --config java
    </pre>
    Display your default Java version:
    <pre>
    # java -version
    java version "1.7.0_10"
    Java(TM) SE Runtime Environment (build 1.7.0_10-b18)
    Java HotSpot(TM) 64-Bit Server VM (build 23.6-b04, mixed mode)
    </pre>

  • Offline search engine based on Oracle Text and XML SDK?

    Hi,
    I am pretty new to Oracle Text, so I am not shure if the
    question is correct.
    We have an intranet, with lots of MS Word, PDF and HTML files.
    The site is starting to get out of hand, there is to many
    information distributed all over it.
    We would need a search engine for these files. The front would
    be HTML or XML based on XSQL. The backend, that is the search
    engine would look like this: I would store the HTML, PDF and
    Word files inf the file system and regularly reload them into
    Oracle into BFILE columns. I could user Oracle Text to index the
    content and use XDK to make the searching part for it.
    Is the Oracle Text feasable?
    Every hint would be highly appreciated.
    Tamas Szecsy

    We would need a search engine for these files. The front would
    be HTML or XML based on XSQL. The backend, that is the search
    engine would look like this: I would store the HTML, PDF and
    Word files inf the file system and regularly reload them into
    Oracle into BFILE columns. I could user Oracle Text to index the
    content and use XDK to make the searching part for it.
    Is the Oracle Text feasable?You can store HTML, PDF and Word documents in the file system or
    in a database column and make it searchable using Oracle Text.
    You can write a JSP or PSP that executes the SQL statement and
    then displays the result. Take a look at the Indagine sample
    code (Java - it's a little bit old: version 8.1.5) or the "Text
    search with PL/SQL Server Pages" notes. All available from
    otn.oracle.com/products/text -> sample code.

  • Oracle 9i and Tomcat JSP

    hi all,
    i just installed oracle 9i and i'm having some issues with running my existing JSP on tomcat. basically tomcat won't start!!
    the exception on starting tomcat that i get is
    "Address in use: JVM_Bind"
    obviously 9i has played with my java vm somewhere and i can't figure out where. is there somewhere in 9i that i can configure the jvm used (or in tomcat even??) ?? some other solution perhaps.
    if anyone has anything at all to help me out it would be most appreciated. thanks.
    Takis

    Hi we have a similar problem.
    Oracle have a service PaginServer, that use a the port 80.
    We shut down this service and it work.
    i hope it help

  • Index rules in oracle text and query using matches

    Dear All,
    I would like to ask about rules and matches function in oracle text.
    I followed an example in oracle text application developer's guide.
    I have a rule table like this :
    1 oracle
    2 larry or ellison
    3 oracle and text
    4 market share
    then, I create an index to that table. This is needed for calling matches function. Here is the syntax :
    create index queryx on queries(query_string)
    indextype is ctxsys.ctxrule;
    then, I noticed that the result on DR$QUERYX$I table as follows :
    LARRY 0 2 2 1 (BLOB)
    MARKET 0 4 4 1 (BLOB) {MARKET} {SHARE}
    ORACLE 0 1 1 1 (BLOB)
    ORACLE 0 3 3 1 (BLOB) {TEXT}
    ELLISON 0 2 2 1 (BLOB)
    What I want to ask is why doesn't the words 'share' and 'text' appear in the DR$QUERYX$ table?
    When we use matches function, it then search on the index result and consequently it wion't find the 'share' word. so when for example I do query like this :
    select query_id from queries where matches(query_string,' It only share ten percent of all products sold')>0
    it will give 0 result since the no word in ' It only share ten percent of all products sold' was in index table. But actually it could possibly be categorized as the 4 category which rules is 'market share'
    I tried this in a larger set of data and get same result.
    Here is my generated rules from my document collection :
    1 {REQUIREMENTS} & {ELICITATION}
    1 {REQUIREMENTS} ~ {ELICITATION} & {ACTOR}
    1 {REQUIREMENTS} ~ {ELICITATION} ~ {ACTOR} & {FURPS}
    1 {REQUIREMENTS} ~ {ELICITATION} ~ {ACTOR} ~ {FURPS} ~ {OUTLINE}
    1 {REQUIREMENTS} ~ {ELICITATION} ~ {ACTOR} ~ {FURPS} ~ {OUTLINE} & {PROC}
    1 {REQUIREMENTS} ~ {ELICITATION} ~ {ACTOR} ~ {FURPS} ~ {OUTLINE} ~ {PROC} & {SPEED}
    1 {REQUIREMENTS} ~ {ELICITATION} ~ {ACTOR} ~ {FURPS} ~ {OUTLINE} ~ {PROC} ~ {SPEED} & {DOCUME}
    1 {REQUIREMENTS} ~ {ELICITATION} ~ {ACTOR} ~ {FURPS} ~ {OUTLINE} ~ {PROC} ~ {SPEED} ~ {DOCUME} & {PLACED}
    1 {REQUIREMENTS} ~ {ELICITATION} ~ {ACTOR} ~ {FURPS} ~ {OUTLINE} ~ {PROC} ~ {SPEED} ~ {DOCUME} ~ {PLACED} & {UNNECESSARY}
    1 {REQUIREMENTS} ~ {ELICITATION} ~ {ACTOR} ~ {FURPS} ~ {OUTLINE} ~ {PROC} ~ {SPEED} ~ {DOCUME} ~ {PLACED} ~ {UNNECESSARY} & {MISUSE}
    1 {INTERPRETATION} ~ {REQUIREMENTS}
    2 {DESIGN} & {REPRESENTATION}
    2 {DESIGN} ~ {REPRESENTATION} & {MAY} & {FOUNDATI} & {OCTOBER}
    2 {DESIGN} ~ {REPRESENTATION} & {MAY} & {FOUNDATI} ~ {OCTOBER} & {PROCEDURAL}
    2 {DESIGN} ~ {REPRESENTATION} & {MAY} & {FOUNDATI} ~ {OCTOBER} ~ {PROCEDURAL} & {STRICT}
    2 {DESIGN} ~ {REPRESENTATION} & {MAY} & {FOUNDATI} ~ {OCTOBER} ~ {PROCEDURAL} ~ {STRICT} & {GRASP}
    2 {DESIGN} ~ {REPRESENTATION} & {MAY} & {FOUNDATI} ~ {OCTOBER} ~ {PROCEDURAL} ~ {STRICT} ~ {GRASP} & {MANY} & {LAYER}
    2 {DESIGN} ~ {REPRESENTATION} ~ {MAY}
    3 {PM} & {TESTING} & {ATTRIBUTI}
    And this is the index table result with ctxrule :
    (only the token_text column shown)
    PM
    DESIGN
    DESIGN
    DESIGN
    DESIGN
    DESIGN
    DESIGN
    DESIGN
    REQUIREMENTS
    REQUIREMENTS
    REQUIREMENTS
    REQUIREMENTS
    REQUIREMENTS
    REQUIREMENTS
    REQUIREMENTS
    REQUIREMENTS
    REQUIREMENTS
    REQUIREMENTS
    INTERPRETATION
    so when I try to classify a document with the word ouline inside it, it should produce category 1 (based on the rules) but since there are no word 'outline' in index tabel, the matches will return 0 means that the document is not classifiedto any category. I don't understand why it happen. Anybody knows about this? I would really appreciate any help.
    Thank you very much.

    Hm, I see. It do make sense. so nice to know.
    But then in the second example I gift where I used larger table, as shown below :
    Here is my generated rules from my document collection :
    1 {REQUIREMENTS} & {ELICITATION}
    1 {REQUIREMENTS} ~ {ELICITATION} & {ACTOR}
    1 {REQUIREMENTS} ~ {ELICITATION} ~ {ACTOR} & {FURPS}
    1 {REQUIREMENTS} ~ {ELICITATION} ~ {ACTOR} ~ {FURPS} ~ {OUTLINE}
    1 {REQUIREMENTS} ~ {ELICITATION} ~ {ACTOR} ~ {FURPS} ~ {OUTLINE} & {PROC}
    1 {REQUIREMENTS} ~ {ELICITATION} ~ {ACTOR} ~ {FURPS} ~ {OUTLINE} ~ {PROC} & {SPEED}
    1 {REQUIREMENTS} ~ {ELICITATION} ~ {ACTOR} ~ {FURPS} ~ {OUTLINE} ~ {PROC} ~ {SPEED} & {DOCUME}
    1 {INTERPRETATION} ~ {REQUIREMENTS}
    2 {DESIGN} & {REPRESENTATION}
    2 {DESIGN} ~ {REPRESENTATION} & {MAY} & {FOUNDATI} & {OCTOBER}
    2 {DESIGN} ~ {REPRESENTATION} & {MAY} & {FOUNDATI} ~ {OCTOBER} & {PROCEDURAL}
    2 {DESIGN} ~ {REPRESENTATION} & {MAY} & {FOUNDATI} ~ {OCTOBER} ~ {PROCEDURAL} & {STRICT}
    2 {DESIGN} ~ {REPRESENTATION} ~ {MAY}
    3 {PM} & {TESTING} & {ATTRIBUTI}
    As far as I know, the sign ' ~ ' means 'OR' and '&' means 'and' . So based on the 4th line in my table :
    1 {REQUIREMENTS} ~ {ELICITATION} ~ {ACTOR} ~ {FURPS} ~ {OUTLINE}
    it can be concluded that if any of the words stated there been queried, so the category '1' will appear as a result. But then before we can use 'matches' to query it, we need ti create index for the rules table . I did it and the result were :
    (only the token_text column shown)
    PM
    DESIGN
    DESIGN
    DESIGN
    DESIGN
    DESIGN
    DESIGN
    DESIGN
    REQUIREMENTS
    REQUIREMENTS
    REQUIREMENTS
    REQUIREMENTS
    REQUIREMENTS
    REQUIREMENTS
    REQUIREMENTS
    REQUIREMENTS
    REQUIREMENTS
    REQUIREMENTS
    INTERPRETATION
    there were no words other than PM, DESIGN< REQUIREMENTS and INTERPRETATION. Why the words REQUIREMENTS, ELICITATION, ACTOR, FURPS, OUTLINE don't appear in the index result?

  • Oracle Text and APEX

    Hello
    Tried the Oracle White Paper - Oracle Text Web Applications
    Created the table and populated with relevant url links
    create table htmldb_documentation(
    id number,
    doc_title varchar2(4000),
    doc_url varchar2(4000))
    then created the index
    create index htmldb_doc_ctxidx on htmldb_documentation(doc_url)
    indextype is ctxsys.context
    parameters ('datastore CTXSYS.URL_DATASTORE')
    Then ran my SQL for the report in Toad and APEX SQL Workshop>SQL Commands before creating an APEX Region based on a SQL Report
    select score(1) relevance, doc_title, doc_url
    from htmldb_documentation
    where CONTAINS (doc_url, :P1_SEARCH, 1) > 0
    order by 1 desc
    After running the APEX Report I get error
    report error:
    ORA-29902: error in executing ODCIIndexStart() routine
    ORA-20000: Oracle Text error:
    DRG-50901: text query parser syntax error on line 1, column 1
    I also ran these grant commands after I received this error
    grant ctxapp to demo;
    grant execute on ctx_cls to demo;
    grant execute on ctx_ddl to demo;
    grant execute on ctx_doc to demo;
    grant execute on ctx_output to demo;
    grant execute on ctx_query to demo;
    grant execute on ctx_report to demo;
    grant execute on ctx_thes to demo;
    grant execute on ctx_ulexer to demo;
    Any ideas ?? I'm running APEX 3.1.0.00.32 on Oracle 10.2.0.1 on WindowsXP
    If I replace the bind variable :P1_SEARCH, with a literal value the error disappears

    Couple of things to check:
    1) do you have an item called P1_SEARCH in your application?
    2) If so, make sure that it has a value; otherwise, Oracle Text gets confused and will throw that error.
    You may want to consider using a PL/SQL Function Returning SQL Query that will only append the CONTAINS clause if P1_SEARCH has some value.
    Thanks,
    - Scott -
    http://sumnertechnologies.com
    http://spendolini.blogspot.com

  • Intermedia text (oracle text) and excel

    Hi,
    is it possible to index just one single sheet instead of the whole excel-workbook in
    oracle text? Or is it possible to name just one sheet (e.g. table1) in a 'contains'
    query? Additionally, is it possible to searc for the number of occurences of a term
    within one document (i.e. excel-sheet)? Thanks for your help in advance.
    Best Regards,
    Dan

    Hi Dan,
    is it possible to index just one single sheet instead of the whole excel-workbook in
    oracle text? No
    Or is it possible to name just one sheet (e.g. table1) in a 'contains'
    query?No
    Additionally, is it possible to searc for the number of occurences of a term
    within one document (i.e. excel-sheet)? Thanks for your help in advance.I am not sure at the moment, maybe with some kind of rankin.
    The problem is the the INSO-filter converts the excel file to a html file and oracle is reading this generated file. And in file there is no information about excel sheets.
    Regards,
    Thomas

  • Oracle Text and MINUS character

    Hi all,
    I have following problem:
    - I have created a Oracle Text Index on the VARCHAR2 column:
    BEGIN
      ctx_ddl.create_preference('SUBSTRING_PREF','BASIC_WORDLIST');
      ctx_ddl.set_attribute('SUBSTRING_PREF','SUBSTRING_INDEX','TRUE');
    END;
    CREATE INDEX IDX_TEXT_1 ON MY_TABLE
    (COLUMN1)
    INDEXTYPE IS CTXSYS.CONTEXT
    PARAMETERS('wordlist SUBSTRING_PREF memory 50m')
    NOPARALLEL;- I execute the following SELECT:
    SELECT mt.*
    FROM  MY_TABLE mt
    WHERE  contains(mt.COLUMN1, 'test%') > 0;It returns all records where the column1 contains the entry "test" + something else.
    BUT the records where column1 contains the entries "my-test" + something else or "owr-test" + something else, a.s.o.
    It should return only the records with "test" + something else entries.
    How can I change the Index or query to achieve it?
    Best regards

    By default, the hyphen is treated as a break character and the words on either side are indexed as separate tokens. To change this behavior, you can create a lexer, set the printjoins attribute of the lexer to include the hyphen, then use that lexer in your index parameters. Then, strings of characters containing a hyphen will be indexed as one token, including the hyphen. Please see the example below.
    SCOTT@orcl_11gR2> CREATE TABLE my_table (column1  VARCHAR2(60))
      2  /
    Table created.
    SCOTT@orcl_11gR2> INSERT ALL
      2  INTO my_table VALUES ('test')
      3  INTO my_table VALUES ('testing')
      4  INTO my_table VALUES ('my-test')
      5  INTO my_table VALUES ('owr-test')
      6  SELECT * FROM DUAL
      7  /
    4 rows created.
    SCOTT@orcl_11gR2> BEGIN
      2    ctx_ddl.create_preference('SUBSTRING_PREF','BASIC_WORDLIST');
      3    ctx_ddl.set_attribute('SUBSTRING_PREF','SUBSTRING_INDEX','TRUE');
      4    CTX_DDL.CREATE_PREFERENCE ('test_lex', 'BASIC_LEXER');
      5    CTX_DDL.SET_ATTRIBUTE ('test_lex', 'PRINTJOINS', '-');
      6  END;
      7  /
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> CREATE INDEX IDX_TEXT_1 ON MY_TABLE (COLUMN1)
      2  INDEXTYPE IS CTXSYS.CONTEXT
      3  PARAMETERS
      4    ('wordlist  SUBSTRING_PREF
      5        LEXER        test_lex
      6        memory    50m')
      7  NOPARALLEL
      8  /
    Index created.
    SCOTT@orcl_11gR2> SELECT token_text FROM dr$idx_text_1$i
      2  /
    TOKEN_TEXT
    MY-TEST
    OWR-TEST
    TEST
    TESTING
    4 rows selected.
    SCOTT@orcl_11gR2> SELECT mt.*
      2  FROM   MY_TABLE mt
      3  WHERE  contains (mt.COLUMN1, 'test%') > 0
      4  /
    COLUMN1
    test
    testing
    2 rows selected.

  • Oracle Text and table joins

    Is it possible to create an index on a view as opposed to a table, when using Oracle Text?

    Thanks for the earlier response.
    I was also loooking at Oracle Ultra Search. I figured out that Ultr search provides out of the box query application to do free-form text search, parameterized search and so on....
    I also read that Oracle Ultra search uses Oracle text as the underlying technology to do the search.
    I have a requirement where most of my searches will be on structured data spread across multiple tables. But I also have a requirement to index some static content which resides on the file system.
    Is it possible to mix and match query results i.e. first perform a search on the structured data and then perform another search on the static document data and then megre results from both and display back to the user?
    Thanks for the help

Maybe you are looking for