: for (component : List<Component>) {
:   // a chance to communicate needs to other components?
:   // highlighting needs a Query or terms, and a list of fields
:   // faceting needs a base DocSet
:   component.prepare(req, rsp);
: }
:
: while (not all components done) {
:   for (component : List<Component>) {
:     boolean done = component.process(req,rsp);
:   }
: }
:
: One interesting/difficult part would be the standardization of the
: communication between components.

Communication can be coordinated with things like
SolrQueryRequest.getContext() ... it will have to be fairly loose
communication governed by convetion, but i don't see anyway to avoid that
in a 'generalized' appraoch like this.

I think this may be the right path to go down ... even if it does open us
up to the possibility of infinte loops ... one thing we may wnat to
consider is spending some time looking at the module flow control system
of things like Apache HTTPD -- this isn't a new problem, and seeing what
they feel they did right/wrong might help us make simila judegement calls.

To me a key thing to try and do is make sure the "out of hte box" toolkits
we provide are always available as both low level utility methods and as
high level "pluggable" components -- if people want to build a custom
request handler that does field collapsing, and they know they always want
field collapsing, it should be possible for them to hard code field
collapsing into their request handler without needing to: a) depend on a
plugin being configured; or b) jumping through a lot of hoops to do the
initialization SolrCore would have done to construct a Component
themselves.

: This is all still so early, and at a high enough level, I'm not saying
: I favor this approach over any other... It's just the first that
: occurred to me.

I think the best appraoch to helping us find what the "contact points"
should be between various pieces of functionality would be to try and
refactor dismax, standard, and mlt to reuse as much code as possible and
see what common API "hook points" come out of it.


-Hoss

Reply via email to