Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle Text question

Re: Oracle Text question

From: BicycleRepairman <engel.kevin_at_gmail.com>
Date: 14 Nov 2006 17:39:09 -0800
Message-ID: <1163554748.962463.310860@h54g2000cwb.googlegroups.com>

Jeremy wrote:
> Version: 9iR2
>
> When you doa search in e.g. google, it comes back with the document
> title and then a few words from the document with the keywords
> highlighted.
>
> Is this possible with Oracle Text in 9i?
>
> We have already defined text indexes and provide keyword searching tools
> but our result sets simply show the score returned by the contains
> clause.
>
> Appreciate any pointers on this?
>
>
> --
> jeremy
>
> ============================================================
> ENVIRONMENT:
> Oracle 9iR2 / Oracle HTTP Server / mod_plsql / Solaris 8
> ============================================================

It's new functionality in 10gR2, so this may not apply to you, but there is a new CTX_DOC function called ctx_doc.snippet() which does this right out of the box:

>From the Text Reference:

Use the CTX_DOC.SNIPPET procedure to produce a concordance for a document. This functionality is also sometimes known as Key Word in Context (KWIC), because it returns query keywords marked up in their surrounding text, allowing the user to evaluate them in context. The returned text can also contain themes that satisfy an ABOUT query.

For example, a search on brillig and slithey might return one fragment of a relevant document:

'Twas <b>brillig</b>, and the <b>slithey</b> toves did gyre and

CTX_DOC.SNIPPET attempts to return a Most Relevant Fragment for a document; if that is not possible, it returns multiple relevant fragments.

hth
--Kevin Received on Tue Nov 14 2006 - 19:39:09 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US