mirror of https://github.com/apache/lucene.git
SOLR-13511: Add SearchHandler.newResponseBuilder method to facilitate custom plugins' maintenance of per-request state in a custom ResponseBuilder. (Ramsey Haddad, Christine Poerschke)
This commit is contained in:
parent
a53a80cfba
commit
5c65d12460
|
@ -118,6 +118,9 @@ Other Changes
|
|||
|
||||
* SOLR-8754: Adding test cases for org.apache.solr.util.hll.NumberUtilTest (Benoit Vanalderweireldt via janhoy)
|
||||
|
||||
* SOLR-13511: Add SearchHandler.newResponseBuilder method to facilitate custom plugins' maintenance
|
||||
of per-request state in a custom ResponseBuilder. (Ramsey Haddad, Christine Poerschke)
|
||||
|
||||
================== 8.1.2 ==================
|
||||
|
||||
Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.
|
||||
|
|
|
@ -247,11 +247,18 @@ public class SearchHandler extends RequestHandlerBase implements SolrCoreAware ,
|
|||
return shardHandler;
|
||||
}
|
||||
|
||||
/**
|
||||
* Override this method if you require a custom {@link ResponseBuilder} e.g. for use by a custom {@link SearchComponent}.
|
||||
*/
|
||||
protected ResponseBuilder newResponseBuilder(SolrQueryRequest req, SolrQueryResponse rsp, List<SearchComponent> components) {
|
||||
return new ResponseBuilder(req, rsp, components);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleRequestBody(SolrQueryRequest req, SolrQueryResponse rsp) throws Exception
|
||||
{
|
||||
List<SearchComponent> components = getComponents();
|
||||
ResponseBuilder rb = new ResponseBuilder(req, rsp, components);
|
||||
ResponseBuilder rb = newResponseBuilder(req, rsp, components);
|
||||
if (rb.requestInfo != null) {
|
||||
rb.requestInfo.setResponseBuilder(rb);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue