: Subject: Custom distributed SearchHandler: where do I store information in the
: ResponseBuilder from handleResponses->finishStage
...
: Facets stores its data in a field in ResponseBuilder:
: public FacetComponent.FacetInfo _facetInfo;
:
: I could add my own field, but it feels strange to have to edit solr code
: to create a new SearchHandler plugin.
Agreed.
The API for writing SearchComponents was primarily designed to make it
straightforward to refactor a lot of stuff that use to be hardcoded in the
old StandardRequestHandler so that it could be in components, and that new
third-party components could be written -- but (in my opinon) the
SearchComponent/ResponseBuilder APIs arent very good or freindly to
writing third-party components .... but i've never had much luck thinking
of anything better.
The only way i know of for a third-party custom SearchComponent (that
isn't replacing/overriding built in component) to keep track of arbitrary
data using ResponseBuilder is to leverage the
SolrQueryRequest's getContext(). You can put anything you wnat in there
during the various stages of a distributed request, and then
when you are all finished and have the final computed vlaues you want to
return, add it to the SolrQueryResponse.
-Hoss
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]