lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Noor <>
Subject Custom Request handler Error:
Date Fri, 12 Jun 2009 10:56:50 GMT
  i am new to apache solr.
I need to create a custom request handler class. So i create a new one 
and changed the solr-config.xml file as,
   <requestHandler name="/select" class="">
        <lst name="defaults">
            <str name="echoParams">explicit</str>
            <str name="q">tandem</str>
            <str name="debugQuery">true</str>

And in my java class, the code is,

public class MyCustomHandler extends RequestHandlerBase{
   public CoreContainer coreContainer;
   public void handleRequestBody(SolrQueryRequest request, 
SolrQueryResponse response) throws Exception {
        SolrCore coreToRequest = coreContainer.getCore("core2");
        ModifiableSolrParams params = new ModifiableSolrParams();
        params.set("echoParams", "explicit");
        params.set("q", "text");
        params.set("debugQuery", "true");
request = new LocalSolrQueryRequest(coreToRequest, params);
        SolrRequestHandler reqHandler = 
        coreToRequest.execute(reqHandler, request, response);
  // the abstract methods - getDescription(), getSourceId(), 
getSource(), getVersion() are //overrided... but these methods doesn't 
have any implementations.

But, if i search any text in my webapp from browser, gots the HTTP 500 
i dont know how SolrContainer is intialized....
Pls anyone give me the solution...

thanks and regards,

View raw message