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 1421F1724E for ; Thu, 4 Jun 2015 11:55:58 +0000 (UTC) Received: (qmail 53324 invoked by uid 500); 4 Jun 2015 11:55:54 -0000 Delivered-To: apmail-lucene-solr-user-archive@lucene.apache.org Received: (qmail 53251 invoked by uid 500); 4 Jun 2015 11:55:54 -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 53238 invoked by uid 99); 4 Jun 2015 11:55:53 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Jun 2015 11:55:53 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 7DC27181A44 for ; Thu, 4 Jun 2015 11:55:53 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 6.023 X-Spam-Level: ****** X-Spam-Status: No, score=6.023 tagged_above=-999 required=6.31 tests=[HTML_MESSAGE=3, KAM_BADIPHTTP=2, KAM_LAZY_DOMAIN_SECURITY=1, NORMAL_HTTP_TO_IP=0.001, T_KAM_HTML_FONT_INVALID=0.01, T_REMOTE_IMAGE=0.01, URIBL_BLOCKED=0.001, WEIRD_PORT=0.001] autolearn=disabled Received: from mx1-us-east.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id eoFmmug2enR7 for ; Thu, 4 Jun 2015 11:55:39 +0000 (UTC) Received: from mail-ig0-f182.google.com (mail-ig0-f182.google.com [209.85.213.182]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with ESMTPS id 56B6A43AC7 for ; Thu, 4 Jun 2015 11:55:39 +0000 (UTC) Received: by igbhj9 with SMTP id hj9so13477593igb.1 for ; Thu, 04 Jun 2015 04:55:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type; bh=pIROfgrdP6RF9/+t1Y10TVILGEc5GYy7jWUDQDHyJWg=; b=YdtMNz4arlbM6eriL2ul1mJTDyl8oZYiIcqRalbZRtdPShDgpe+8XwK2HNcBx78GNT MCgO29TyueoGSFCb3uaBuWXNfKxkl31D3/1oA7QEitkblzj4jrhWtrDV38Pii44zQhdq vAXjIKrVjpLwsnQo4bVOb6iBjQN86uWlvR1YGsR5BSaqCYY8kM67cgD8xz4vo3dZ4BYx cgzdGnT2cQ3i9EDv/Yev5ru7Bbh5KXuG0YUNUl8sCHir2GetCLRI5pogzn2gYaovkjaT 2num/icCc05aiIwwoOYYlR4DlpaJGq6Kyh9CE/sBiQ2TGta0rCcv8/waYe40sCINsLel psGQ== X-Gm-Message-State: ALoCoQnRhc24Cazk36sOwdmOeiuiMNKflaNJ5+hmhxkDKxYr9f4DxISPUwygZmAvwMa2peON8x4Nt8NqV6D0yf5H8nRad+2j0oDZrWtxyaa+jOH/Piwx/CEmFsD9QXO0M78JgPAxNDxo X-Received: by 10.42.152.67 with SMTP id h3mr3903607icw.56.1433418933582; Thu, 04 Jun 2015 04:55:33 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.181.83 with HTTP; Thu, 4 Jun 2015 04:55:13 -0700 (PDT) In-Reply-To: References: <45EFF0C6-8A53-432A-82A0-54D9DC619EC7@wunderwood.org> From: Dhanesh Radhakrishnan Date: Thu, 4 Jun 2015 17:25:13 +0530 Message-ID: Subject: Re: How to identify field names from the suggested values in multiple fields To: solr-user@lucene.apache.org Content-Type: multipart/alternative; boundary=90e6ba6e8dc259d4ed0517afda2a --90e6ba6e8dc259d4ed0517afda2a Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Dear Erick, That document help me to build multiple suggesters But still there is one problem that I faced. When I used both suggesters with same lookupImpl as AnalyzingInfixLookupFactory AnalyzingInfixLookupFactory solr throws an error Caused by: java.lang.RuntimeException at org.apache.solr.spelling.suggest.fst.AnalyzingInfixLookupFactory.create(Ana= lyzingInfixLookupFactory.java:138) at org.apache.solr.spelling.suggest.SolrSuggester.init(SolrSuggester.java:107) at org.apache.solr.handler.component.SuggestComponent.inform(SuggestComponent.= java:119) at org.apache.solr.core.SolrResourceLoader.inform(SolrResourceLoader.java:620) at org.apache.solr.core.SolrCore.(SolrCore.java:868) ... 8 more So that I changed the Lookup with FuzzyLookupFactory suggester worked for both fields. Is there any limitation using AnalyzingInfixLookupFactory for multiple suggesters I'm using SOLR 5.1 Regards dhanesh s.r On Thu, Jun 4, 2015 at 11:33 AM, Erick Erickson wrote: > Yes, this might help: http://lucidworks.com/blog/solr-suggester/ > > Best, > Erick > > On Wed, Jun 3, 2015 at 10:32 PM, Dhanesh Radhakrishnan > wrote: > > Thank you for the quick response. > > If I use 2 suggesters, can I get the result in a single request? > > > http://192.17.80.99:8983/solr/core1/suggest?suggest=3Dtrue&suggest.dictio= nary=3DmySuggester&wt=3Dxml&suggest.q=3Dschool > > Is there any helping document to build multiple suggesters?? > > > > > > On Thu, Jun 4, 2015 at 10:40 AM, Walter Underwood > > > wrote: > > > >> Configure two suggesters, one based on each field. Use both of them an= d > >> you=E2=80=99ll get separate suggestions from each. > >> > >> wunder > >> Walter Underwood > >> wunder@wunderwood.org > >> http://observer.wunderwood.org/ (my blog) > >> > >> > >> On Jun 3, 2015, at 10:03 PM, Dhanesh Radhakrishnan > >> wrote: > >> > >> > Hi > >> > Anyone help me to build a suggester auto complete based on multiple > >> fields? > >> > There are two fields in my schema. Category and Subcategory and I'm > >> trying > >> > to build suggester based on these 2 fields. When the suggestions > result, > >> > how can I distinguish from which filed it come from? > >> > > >> > I used a copyfields to combine multiple fields into single field and > use > >> > that field in suggester > >> > But this will return the combined result of category and > subcategory. I > >> > can't differentiate the results that fetch from which field > >> > > >> > These are the copyfields for autocomplete > >> > > >> > > >> > > >> > Suggestions should know from which field its from. > >> > For Eg my suggester returns 5 results for the keyword "schools". In > that > >> > result 2 from the category field and 3 from the subcategory field. > >> > > >> > Schools (Category) > >> > Primary Schools (Subcategory) > >> > Driving Schools (Subcategory) > >> > Day care and play school (Subcategory) > >> > Day Care/Play School (Category) > >> > > >> > > >> > Is there any way to build like this ?? > >> > > >> > > >> > -- > >> > [image: hifx_logo] > >> > *dhanesh s.R * > >> > Team Lead > >> > t: (+91) 484 4011750 (ext. 712) | m: (+91) 99 4 6666 703 > >> > e: dhanesh@hifx.in | w: www.hifx.in > >> > > >> > > >> > > >> > > >> > -- > >> > > >> > ------------------------------ > >> > IMPORTANT: This is an e-mail from HiFX IT Media Services Pvt. Ltd. I= ts > >> > content are confidential to the intended recipient. If you are not t= he > >> > intended recipient, be advised that you have received this e-mail in > >> error > >> > and that any use, dissemination, forwarding, printing or copying of > this > >> > e-mail is strictly prohibited. It may not be disclosed to or used by > >> anyone > >> > other than its intended recipient, nor may it be copied in any way. = If > >> > received in error, please email a reply to the sender, then delete i= t > >> from > >> > your system. > >> > > >> > Although this e-mail has been scanned for viruses, HiFX cannot > ultimately > >> > accept any responsibility for viruses and it is your responsibility = to > >> scan > >> > attachments (if any). > >> > > >> > > >> > Before you print this email or attachments, please consider the > negative > >> > environmental impacts associated with printing. > >> > >> > > > > > > -- > > [image: hifx_logo] > > *dhanesh s.R * > > Team Lead > > t: (+91) 484 4011750 (ext. 712) | m: (+91) 99 4 6666 703 > > e: dhanesh@hifx.in | w: www.hifx.in > > > > > > > > > > -- > > > > ------------------------------ > > IMPORTANT: This is an e-mail from HiFX IT Media Services Pvt. Ltd. Its > > content are confidential to the intended recipient. If you are not the > > intended recipient, be advised that you have received this e-mail in > error > > and that any use, dissemination, forwarding, printing or copying of thi= s > > e-mail is strictly prohibited. It may not be disclosed to or used by > anyone > > other than its intended recipient, nor may it be copied in any way. If > > received in error, please email a reply to the sender, then delete it > from > > your system. > > > > Although this e-mail has been scanned for viruses, HiFX cannot ultimate= ly > > accept any responsibility for viruses and it is your responsibility to > scan > > attachments (if any). > > > > > > Before you print this email or attachments, please consider the negativ= e > > environmental impacts associated with printing. > --=20 [image: hifx_logo] *dhanesh s.R * Team Lead t: (+91) 484 4011750 (ext. 712) | m: =E2=80=8B(+91) 99 4 6666 703 e: dhanesh@hifx.in | w: www.hifx.in --=20 ------------------------------ IMPORTANT: This is an e-mail from HiFX IT Media Services Pvt. Ltd. Its=20 content are confidential to the intended recipient. If you are not the=20 intended recipient, be advised that you have received this e-mail in error= =20 and that any use, dissemination, forwarding, printing or copying of this=20 e-mail is strictly prohibited. It may not be disclosed to or used by anyone= =20 other than its intended recipient, nor may it be copied in any way. If=20 received in error, please email a reply to the sender, then delete it from= =20 your system.=20 Although this e-mail has been scanned for viruses, HiFX cannot ultimately= =20 accept any responsibility for viruses and it is your responsibility to scan= =20 attachments (if any). =E2=80=8B Before you print this email or attachments, please consider the negative=20 environmental impacts associated with printing. --90e6ba6e8dc259d4ed0517afda2a--