Re: htdig: Sorting results on date (3)


Geoff Hutchison (ghutchis@wso.williams.edu)
Wed, 16 Dec 1998 16:45:44 -0500


At 4:04 PM -0500 12/16/98, Gilles Detillieux wrote:
>This will be a problem for 3.1.0b3 as well, with or without my sort patch!
>Geoff introduced some modifications to the score calculation (before the
>sort) which require the DocTime(), DocLinks() and DocBackLinks() from the
>DocumentRef record. This works fine if your search doesn't match a huge
>number of documents, but if it does, lookout!

Ah, that's a good point. But what we can do is load the DocRef once, get
the data we need and then delete the reference. This way we calculate the
score and anything else needed for sorting, then we free the memory.

>A quick fix, I think, would be to change String::allocate_space()
>to delete and re-allocate the Data array if the space required
>goes down by more than some value (e.g. 256 chars), then just set
>the String's in the DocumentRef record to 0, unless you need them,
>in Display::buildMatchList(). That should greatly reduce htsearch's
>memory requirements, but does nothing to speed up the fetching of all
>that data you just end up throwing out again. Anyone have a better plan?

See above. Changing allocate_space(), of course, reduces memory in htdig
and htmerge too. This might not be a bad feature for the String class, but
I don't know how much it would help.

-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:29:53 PST