Hi,
You can use fthighlight function for this, it returns a string
containing XML with '<' replaced by , '>' replaced by
, and some " replaced by , with added <hit> tags
around matched words.
Here's an example of a query that returns matched documents in XML:
declare option se:character-map "=<";
declare option se:character-map "=>";
declare option se:character-map "=&quot;";
let $q := "query"
for $r in ftindex-scan("fti",$q)
return
fthighlight($r, $q, "as_index=fti")
If you need to get matched words, you'll need to use something like
fn:tokenize & fn:replace (using functx:get-matches would be easier,
but AFAIR it's not available in Sedna)
On Mon, Jul 11, 2011 at 1:57 PM, giocondo sticca
<[email protected]> wrote:
> Hi Roman,
>
> there's a way to obtain a list of searched words in a full-text search when
> stemming is activated ?
>
> Example:
>
> If I search for "acque" I need to know what's the real search for example
> "acqu*". I need this function to make words highlight on results.
>
> Thanks.
>
------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
Sedna-discussion mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sedna-discussion