Jump to Firt hit.

Post Reply
gazim
Posts: 66
Joined: Sun Feb 18, 2001 1:01 pm

Jump to Firt hit.

Post by gazim »

Topic: Jump to First hit

With the metamorph API is it possible to Jump to the first hit and display only the Hit and surrounding texts? I have a table with a blob field. I would like to do a query on that field for a keyword and display only the first hit and it's surrouding text. Thanks in advance.
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

Jump to Firt hit.

Post by mark »

The metamorph API just finds hits in the text for you. How they're presented is entirely up to you. In html you would surround the hit with <a name="hit1"> and </a>, then in the link to the page with markup you would use hit1 as the anchor, eg http://.../display.html#hit1 .

In vortex you would just use <fmt "%mH" ...> or similar to do the markup.
User avatar
John
Site Admin
Posts: 2622
Joined: Mon Apr 24, 2000 3:18 pm
Location: Cleveland, OH
Contact:

Jump to Firt hit.

Post by John »

You can use the mminfo or abstract functions to find a chunk of text surrounding a hit. With mminfo it can return info on as many hits as you want, with abstract it will be the "best" hit, not necessarily the first.

E.g. select abstract(Field, 250, 1, 'query words') ...
select mminfo ('query words w/250', Field, 1, 0, 0) ...
John Turnbull
Thunderstone Software
Post Reply