Gilles Detillieux (email@example.com)
Tue, 12 Oct 1999 16:22:04 -0500 (CDT)
According to Brian Salter-Duke:
> I have ht://dig set up nicely now to search a series of teaching modules
> on my server. The results of a search display 4 lines of the text that
> includes the search target. However if the target is there several times
> in one page, it only displays the first one. Is there any way to
> configure htsearch so it displays all hits in one page? Some other
> search programs such as glimpse do this, but we have decided for reasons
> I am sure you all share to use ht://dig only.
> Say I search for the word
> "orbital". It gives me 36 hits displayed 9 per page (I set the 9).
> Each hit consists of the page title as a highlighted URL followed by
> the 4 lines of context around the first time it finds the word "orbital".
> The word "orbital" is highlighted as bold.
> Now say in one page it finds the word orbital three times in widely
> spaced lines of the page - say lines 2, 8, and 20. I want it to give 4
> lines output for each of these hits - 12 lines in all, say lines 1-4,
> 7-10 and 19-22, say separated by a blank line.
> Is this possible? With either swish-e or glimpse (I forget which) I got
> n lines for n hits in one page. If it found the word once, it gave 1
> line. If it found it 9 times it gave 9 lines. I want something like this
> in htdig.
Well, it doesn't work by lines, as lines in free-format HTML text aren't
a particularly meaningful concept. (Line breaks are determined by the
browser software, not by the server.) By default, htsearch displays
excerpts of about 300 characters, rounded to the word. This is controlled
by the excerpt_length attribute.
At present, there is currently no way to configure htsearch to display
multiple excerpts per matching document, so that all the matching words
are highlighted in the search results. One excerpt is all you get right
now, but you can make it a very large one.
Multiple excerpts would be a useful feature to add, as an option
selected in the configuration, if someone has the time and inclination
to tackle it. The function which currently handles the excerpt display
is Display::excerpt(), in htsearch/Display.cc. Any takers? (I know
there's a feature freeze right now, but there's always next release.)
-- Gilles R. Detillieux E-mail: <firstname.lastname@example.org> Spinal Cord Research Centre WWW: http://www.scrc.umanitoba.ca/~grdetil Dept. Physiology, U. of Manitoba Phone: (204)789-3766 Winnipeg, MB R3E 3J7 (Canada) Fax: (204)789-3930
------------------------------------ To unsubscribe from the htdig mailing list, send a message to email@example.com containing the single word unsubscribe in the SUBJECT of the message.
This archive was generated by hypermail 2.0b3 on Sat Oct 23 1999 - 09:48:23 PDT