lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Noble Paul നോബിള്‍ नोब्ळ् <noble.p...@corp.aol.com>
Subject Re: Custom Request handler Error:
Date Fri, 12 Jun 2009 12:57:22 GMT
is there any error on the console?

On Fri, Jun 12, 2009 at 4:26 PM, Noor<noor.m@opentechindia.com> wrote:
> hi,
>  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="solr.my.MyCustomHandler">
>       <lst name="defaults">
>           <str name="echoParams">explicit</str>
>           <str name="q">tandem</str>
>           <str name="debugQuery">true</str>
>       </lst>
>   </requestHandler>
>
> 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.getRequestHandler("/select");
>       coreToRequest.execute(reqHandler, request, response);
>       coreToRequest.close();
>       request.close();
>   }
>  // 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
> error.
> i dont know how SolrContainer is intialized....
> Pls anyone give me the solution...
>
> thanks and regards,
> Mohamed
>



-- 
-----------------------------------------------------
Noble Paul | Principal Engineer| AOL | http://aol.com

Mime
View raw message