|
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
-
Query should be a string containing a metamorph query.
- data
-
The text to search. May be literal data or a field from the table.
- nhits
-
The maximum number of hits to return. If it is 0, which
is the default, you will get all the hits.
- msgs
-
An integer; controls what information is returned. A bit-wise OR of
any combination of the following values:
- 1 to get matches and offset/length information
- 2 to suppress text from
data which matches; printed by default - 4 to get a count of hits (up to
nhits) - 8 to get the hit count in a numeric parseable format
- 16 to get the offset/length in the original query of each search set
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:
- offset is the offset within the data of the overall hit context
(sentence, paragraph, etc...)
- length is the length of the overall hit context
- suboff is the offset within the hit of a matching term
- sublen is the length of the matching term
- suboff and sublen will be repeated for as many terms as are
required to satisfy the query.
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
Copyright © Thunderstone Software Last updated: Sun Mar 17 21:14:49 EDT 2013
|