At 9:46 PM -0400 4/12/00, James Tillman wrote:
>* Achieving an API for htsearch will require moving a lot of code out of the
>htsearch.cc and parser.cc modules and into a new class. I've been calling it
>Searcher.cc, but in deference to Andrew S., who believes classes should model
>form, rather than function, it could also be called Search.cc and represent an
But we also have the Retriever and Parser classes in htdig/. I don't
think it matters much. Since you already picked Searcher.cc, it's
probably easier CVS-wise to stick to this name if no one cares.
>*My original attempt to achieve such an API was actually successful to a
>degree, and I actually committed the changes to the default htdig3 CVS branch
>(which was open to experimentation at the time). What I ended up with was a
I think it's still open to experimentation if people are interested
in that, but it seems that the 3-2-x branch is where people are
working. IMHO, this is probably a good thing so we can actually focus
on getting 3.2.0 out. :-)
>*While my original Searcher.cc wouldn't even work in the current state of the
>source (due to the multiple database support that was added recently), I
>think we might be able to take these concepts and still achieve a usable API.
>I've seen discussing of a SyntaxTree class, which sounds good to me, and that
>would presumably be used by the Searcher class if the scheme mentioned above
>were used. My original Searcher ended up being quite large (containing all of
>parser.cc and most of htsearch.cc when it was all finished).
Yeah, I think this is fine. Andrew suggested that the ParseTree class
perform the actual retrieval of documents, but I don't think it
matters much. I could just as easily see the ParseTree handed off to
a Searcher object which performs the database lookups.
One thing I'm not sure about as far as class naming is ResultList.
I'm not sure it really should be called a "List" because this implies
the underlying data structure is actually a list. I guess I'd go for
"ResultCollection," but again, I don't care so much about exact names
as long as they seem fairly logical.
I thought the Search/Searcher class was a great idea when you added
it to the tree and I still do. I hope to hash out some preliminary
ParseTree classes sometime this afternoon or evening and I'll post
those to the list when I have them in a reasonable state. (In the
spirit of the Transport class, I'll pass around the underlying
classes before I actually hook it into the code.)
-Geoff
------------------------------------
To unsubscribe from the htdig3-dev mailing list, send a message to
[EMAIL PROTECTED]
You will receive a message to confirm this.