This function lets you obtain Metamorph info. You have the choice of either just getting the portions of the document which were the hits, or you can also get messages which describe each hit and subhits.
The SQL to use is as follows:
SELECT mminfo(query,data[,nhits,[0,msgs]]) from TABLE
[where CONDITION];
Query should be a string containing a metamorph query.
The text to search. May be literal data or a field from the table.
The maximum number of hits to return. If it is 0, which is the default, you will get all the hits.
An integer; controls what information is returned. A bit-wise OR of any combination of the following values:
data
which matches; printed by defaultnhits
)
Set offset/length information (value 16) is of the form:
Set N offset/len in query: setoff setlen
Where N
is the set number (starting with 1), setoff
is
the byte offset from the start of the query where set N
is,
and setlen
is the length of the set.
This information is available in version 5.01.1220640000 20080905
and later.
Hit offset/length information is of the form:
300 <Data from Texis> offset length suboff sublen [suboff sublen]..
301 End of Metamorph hit
Where:
Example:
select mminfo('power struggle @0 w/.',Body,0,0,1) inf from html
where Title\Meta\Body like 'power struggle';
Would give something of the form:
300 <Data from Texis> 62 5 0 5
power
301 End of Metamorph hit
300 <Data from Texis> 2042 5 0 5
power
301 End of Metamorph hit
300 <Data from Texis> 2331 5 0 5
POWER
301 End of Metamorph hit
300 <Data from Texis> 2892 8 0 8
STRUGGLE
301 End of Metamorph hit