Re: htdig: Phrase Search with htsearch!


Geoff Hutchison (Geoffrey.R.Hutchison@williams.edu)
Wed, 07 Oct 1998 13:11:55 -0400


>Could someone tell me how hard it is to modify the code, and what files
>should I look at??

This shouldn't be too difficult, at least for "near" searching. Exact
phrase searching may be a little more difficult.

For the code, look at htsearch.cc (the function htsearch() returns the
result documents). When we add words to the db, we record the position of
the words in the document (scaled to 1000).

So a "near" search probably should return a match if
abs(location(word1)-location(word2)) <= 2 (or something small). For
multiple words, this gets a little more complex. Perhaps including a match
if each word is 2 units away from some other word in the list?

-Geoff Hutchison
Williams Students Online
http://wso.williams.edu/

----------------------------------------------------------------------
To unsubscribe from the htdig mailing list, send a message to
htdig-request@sdsu.edu containing the single word "unsubscribe" in
the body of the message.



This archive was generated by hypermail 2.0b3 on Sat Jan 02 1999 - 16:28:29 PST