I'd like to change the ResultMatch class, used in htsearch.

It should be as small as possible, containing just the data
needed for the selected search method, without excess baggage.

The current solution is to have the "score" as a member, but
"punting" to a DocumentRef for any other search method.
Each DocumentRef is 212 bytes (on intel-linux if just containing
the data needed by ResultMatch).  A ResultMatch is 24 bytes. 
 This is awkward if memory resources are limited by facts or
policy, and anyway you really want to avoid using more MB than
needed on your webserver.
 For example, if your non-score-search is in excess of 10000
hits, this means you wasted 2M, if you have them in the first
place, or an aborted search otherwise.

The main change would be to remove the DocumentRef* member in
favor of just the data needed.  I'd probably change the used
class to inherit from a common virtual ResultMatch class, and
have subclasses for each search method (don't remember which
pattern this would be, maybe Factory).

The reason why I post this instead of just doing it (it should be
a rather limited change) is that I have a hunch that someone is
working on similar or overlapping issues right now.

Comments, screams in agony, flames?

brgds, H-P

------------------------------------
To unsubscribe from the htdig3-dev mailing list, send a message to
[EMAIL PROTECTED] containing the single word "unsubscribe" in
the SUBJECT of the message.

Reply via email to