Return-Path: X-Original-To: apmail-lucene-solr-user-archive@minotaur.apache.org Delivered-To: apmail-lucene-solr-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6446D104E0 for ; Tue, 11 Mar 2014 08:41:34 +0000 (UTC) Received: (qmail 63580 invoked by uid 500); 11 Mar 2014 08:41:25 -0000 Delivered-To: apmail-lucene-solr-user-archive@lucene.apache.org Received: (qmail 63320 invoked by uid 500); 11 Mar 2014 08:41:23 -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 62480 invoked by uid 99); 11 Mar 2014 08:41:21 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Mar 2014 08:41:21 +0000 X-ASF-Spam-Status: No, hits=2.3 required=5.0 tests=SPF_SOFTFAIL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: softfail (nike.apache.org: transitioning domain of rachun.chom@gmail.com does not designate 216.139.236.26 as permitted sender) Received: from [216.139.236.26] (HELO sam.nabble.com) (216.139.236.26) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Mar 2014 08:41:16 +0000 Received: from ben.nabble.com ([192.168.236.152]) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1WNIF4-00049x-W4 for solr-user@lucene.apache.org; Tue, 11 Mar 2014 01:40:54 -0700 Date: Tue, 11 Mar 2014 01:40:54 -0700 (PDT) From: rachun To: solr-user@lucene.apache.org Message-ID: <1394527254985-4122780.post@n3.nabble.com> Subject: PHP Solr Client - spellchecker MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Dear all gurus, I'm having problem with trying to use spell checker for my suggestion and I'm using PHP Solr client. So I tried to code like this =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3DPHP=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D $config =3D array ( 'hostname' =3D> 'localhost', 'port' =3D> '8983', 'path' =3D> 'solr' ); $q=3D'macbook'; $client =3D new SolrClient($config); $query =3D new SolrQuery(); $query->setQuery($q); $query->addParam("shards.qt","/spell"); $query->addParam("fl","product_name_th"); $query_response =3D $client->query($query); $result =3D $query_response->getResponse(); print_r($result); =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Re= sult =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D SolrObject Object ( [responseHeader] =3D> SolrObject Object ( [status] =3D> 0 [QTime] =3D> 2 [params] =3D> SolrObject Object ( [fl] =3D> product_name_th [indent] =3D> on [shards.qt] =3D> /spell [start] =3D> 0 [q] =3D> macbook [wt] =3D> xml [rows] =3D> 0 [version] =3D> 2.2 ) ) [response] =3D> SolrObject Object ( [numFound] =3D> 4 [start] =3D> 0 [docs] =3D>=20 ) ) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Solr = Log =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D INFO - 2014-03-11 15:23:48.556; org.apache.solr.core.SolrCore; [collection1] webapp=3D/solr path=3D/select/ params=3D{fl=3Dproduct_name_th&indent=3Don&shards.qt=3D/spell&start=3D0&q= =3Dmacbook&wt=3Dxml&rows=3D0&version=3D2.2} hits=3D4 status=3D0 QTime=3D2=20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D At this log you can see it didn't go through my requestHandler named spell but when I try this http://localhost:8983/solr/spell?spellcheck=3Dtrue&qt=3Dspellchecker&spellc= heck.accuracy=3D0.8&spellcheck.collate=3Dtrue&fl=3Dproduct_name_th&extended= Results=3Dtrue+&q=3Dmacbook I get the result like this (which is the way I would love it to be).... 0 1 Macbook Pro Macbook air =E0=B8=81=E0=B8=A3=E0=B8=B0=E0=B9=80=E0= =B8=9B=E0=B9=8B=E0=B8=B2=E0=B9=83=E0=B8=AA=E0=B9=88 macbook air =E0=B8=81=E0=B8=A3=E0=B8=B0=E0=B9=80=E0= =B8=9B=E0=B9=8B=E0=B8=B2=E0=B9=83=E0=B8=AA=E0=B9=88 macbook pro false =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3DSolr log= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D INFO - 2014-03-11 15:34:57.013; org.apache.solr.core.SolrCore; [collection1] webapp=3D/solr path=3D/spell params=3D{spellcheck=3Dtrue&extendedResults=3Dtrue&fl=3Dproduct_name_th&spe= llcheck.accuracy=3D0.8&q=3Dmacbook&spellcheck.collate=3Dtrue&qt=3Dspellchec= ker} hits=3D4 status=3D0 QTime=3D2=20 At this point I can see that it goes through my requestHandler named spell =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Did I do something wrong? I really need help. Thank you very much, Rachun =20 -- View this message in context: http://lucene.472066.n3.nabble.com/PHP-Solr-C= lient-spellchecker-tp4122780.html Sent from the Solr - User mailing list archive at Nabble.com.