Return-Path: Delivered-To: apmail-lucene-solr-user-archive@minotaur.apache.org Received: (qmail 41120 invoked from network); 13 Jun 2009 11:23:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 13 Jun 2009 11:23:29 -0000 Received: (qmail 39118 invoked by uid 500); 13 Jun 2009 11:23:39 -0000 Delivered-To: apmail-lucene-solr-user-archive@lucene.apache.org Received: (qmail 39040 invoked by uid 500); 13 Jun 2009 11:23:38 -0000 Mailing-List: contact solr-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: solr-user@lucene.apache.org Delivered-To: mailing list solr-user@lucene.apache.org Received: (qmail 39030 invoked by uid 99); 13 Jun 2009 11:23:38 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 13 Jun 2009 11:23:38 +0000 X-ASF-Spam-Status: No, hits=1.5 required=10.0 tests=SPF_PASS,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of noble.paul@gmail.com designates 209.85.217.215 as permitted sender) Received: from [209.85.217.215] (HELO mail-gx0-f215.google.com) (209.85.217.215) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 13 Jun 2009 11:23:29 +0000 Received: by gxk11 with SMTP id 11so4277499gxk.5 for ; Sat, 13 Jun 2009 04:23:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:reply-to:received :in-reply-to:references:from:date:x-google-sender-auth:message-id :subject:to:content-type:content-transfer-encoding; bh=c2u41+IbzNf9qDsxnGDi6qS/7aObnM5eStcEvhVAlgU=; b=Cl7xIBN/zZjxkubuv+l4H4ApR39u27Sj5uCZOc/jtRKoK3sMHqIGh4LDS7Adxquhk3 VThyPsezTiWnzAjCZKqFmSEKnkYmMkIVP4gz7ysppSTs65o7SlCbrWuwBZ4yuo8b2z31 pA0xAqKNY6t2USCOK9+Tkt2e0sPDbJ2H14b9I= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:reply-to:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:content-type :content-transfer-encoding; b=Gs2RlStsPY/FaUEcdZo3h2jrr/ORTf4efA8uO06KsFhYotYtzvotPlJNr/v6Ujr7lo DRPU8On+m3g+EawaYFizonwFfyuzAm6/GNq6iF7AZnLyINniC0gvI1HRJI1k1KzI21Dw svSs34AbjZmllvRblZplt7eh5APIw0QZDHB9o= MIME-Version: 1.0 Sender: noble.paul@gmail.com Reply-To: noble.paul@gmail.com Received: by 10.231.39.141 with SMTP id g13mr1925596ibe.34.1244892188090; Sat, 13 Jun 2009 04:23:08 -0700 (PDT) In-Reply-To: <4A32683C.6060206@opentechindia.com> References: <4A323472.9040902@retailwave.com> <5e76b0ad0906120557s44376030hb50412aeb62feac5@mail.gmail.com> <4A32683C.6060206@opentechindia.com> From: =?UTF-8?B?Tm9ibGUgUGF1bCDgtKjgtYvgtKzgtL/gtLPgtY3igI0gIOCkqOCli+CkrOCljeCks+CljQ==?= Date: Sat, 13 Jun 2009 16:52:48 +0530 X-Google-Sender-Auth: c211f0f60fcbc715 Message-ID: <5e76b0ad0906130422k19018c32ucf96310785a23cb8@mail.gmail.com> Subject: Re: Custom Request handler Error: To: solr-user@lucene.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org register your handler in some other name and fire a request to that On Fri, Jun 12, 2009 at 8:07 PM, noor wrote: > I solved this NullPointerException, by the following changes. > > In java code: > public void handleRequestBody(SolrQueryRequest request, SolrQueryResponse > response) throws Exception { > SolrCore coreToRequest =3D request.getCore();//coreContainer.getCore("cor= e2"); > ..... > } > > and in solr-config.xml: > > > explicit > tandem > true > > > > Now, my webapp runs fine by, > http://localhost:8983/mysearch > searching also working fine. > But, these are not run through my custom handler. So i felt, it wrongly > doing searching. > Because, in solr admin statistics page, > my custom handler under QueryHandler's request count remains 0, it doesn'= t > get incremented, when i search something. Rather, statndardReqHandler's > request count is incremented. > > And another thing, how do we debug solr. ??? > Please anybody help me to solve this ... > > Thanks in advance. > > Noble Paul ??????? ?????? wrote: >> >> is there any error on the console? >> >> On Fri, Jun 12, 2009 at 4:26 PM, Noor wrote: >> >>> >>> hi, >>> =A0i 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, >>> =A0 >>> =A0 =A0 =A0 >>> =A0 =A0 =A0 =A0 =A0explicit >>> =A0 =A0 =A0 =A0 =A0tandem >>> =A0 =A0 =A0 =A0 =A0true >>> =A0 =A0 =A0 >>> =A0 >>> >>> And in my java class, the code is, >>> >>> public class MyCustomHandler extends RequestHandlerBase{ >>> =A0public CoreContainer coreContainer; >>> =A0public void handleRequestBody(SolrQueryRequest request, >>> SolrQueryResponse >>> response) throws Exception { >>> =A0 =A0 =A0SolrCore coreToRequest =3D coreContainer.getCore("core2"); >>> =A0 =A0 =A0ModifiableSolrParams params =3D new ModifiableSolrParams(); >>> =A0 =A0 =A0params.set("echoParams", "explicit"); >>> =A0 =A0 =A0params.set("q", "text"); >>> =A0 =A0 =A0params.set("debugQuery", "true"); >>> request =3D new LocalSolrQueryRequest(coreToRequest, params); >>> // =A0 =A0 =A0 =A0 =A0 =A0 SolrRequestHandler reqHandler =3D >>> coreToRequest.getRequestHandler("/select"); >>> =A0 =A0 =A0coreToRequest.execute(reqHandler, request, response); >>> =A0 =A0 =A0coreToRequest.close(); >>> =A0 =A0 =A0request.close(); >>> =A0} >>> =A0// 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 >>> >>> >> >> >> >> > > --=20 ----------------------------------------------------- Noble Paul | Principal Engineer| AOL | http://aol.com