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 AE05810E42 for ; Mon, 24 Nov 2014 21:11:25 +0000 (UTC) Received: (qmail 61465 invoked by uid 500); 24 Nov 2014 21:11:21 -0000 Delivered-To: apmail-lucene-solr-user-archive@lucene.apache.org Received: (qmail 61392 invoked by uid 500); 24 Nov 2014 21:11:21 -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 61380 invoked by uid 99); 24 Nov 2014 21:11:21 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Nov 2014 21:11:21 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of faisal.mansoor@gmail.com designates 209.85.217.169 as permitted sender) Received: from [209.85.217.169] (HELO mail-lb0-f169.google.com) (209.85.217.169) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Nov 2014 21:11:13 +0000 Received: by mail-lb0-f169.google.com with SMTP id p9so7105660lbv.14 for ; Mon, 24 Nov 2014 13:10:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=Ni/ALufa1brG89qoXYjHMjXbxBHnHcONO2IERQczqmA=; b=erq5AaRtfxh26ngJ1gHR++F+iJ72VQo+fRUAcMuBm58vhhTkJ8Le3OunR6GANR8R44 QA4wqeea758YRfvLqpMs4UfqternLlNmH1lFb50dOEAsCk7xTh70wyUG+o5HQzaBaI6j pOcxNKSoVig14oXMZe0/6nlGHxCFQh9bRCY8vnKEdqLMEfKoRAYcaFC6+wOWvDn3n4mX kmR9RMjwI5QV0shX1p4nwHD7UC+5zhgPoEGWLS8qHUZCoZ3H1EDGVrikMTTLA08bG2xY CnGDLXs49Uxjxicqz9kyf5Skn8vyBWTXPJQPvPAux75tDKaFOjYB1ZUnV/msz/571t5l tMtQ== X-Received: by 10.152.43.166 with SMTP id x6mr12496598lal.14.1416863406004; Mon, 24 Nov 2014 13:10:06 -0800 (PST) MIME-Version: 1.0 Received: by 10.112.205.33 with HTTP; Mon, 24 Nov 2014 13:09:45 -0800 (PST) In-Reply-To: References: From: Faisal Mansoor Date: Mon, 24 Nov 2014 13:09:45 -0800 Message-ID: Subject: Re: Using stored value of a field to build suggester index To: solr-user@lucene.apache.org Content-Type: multipart/alternative; boundary=001a11c29b5802a22a0508a138e3 X-Virus-Checked: Checked by ClamAV on apache.org --001a11c29b5802a22a0508a138e3 Content-Type: text/plain; charset=UTF-8 Thanks Erick, This makes things clearer. Thanks, Faisal On Sun, Nov 23, 2014 at 2:17 PM, Erick Erickson wrote: > You can't build the suggester from the stored > values, it's constructed from indexed terms only. > > You probably want to create a copyField to > a less-analyzed (indexed) field and suggest > from _that_. You'll probably want to do things > like remove punctuation, perhaps lowercase > and the like but not stem etc..... > > Best, > Erick > > On Sun, Nov 23, 2014 at 12:25 PM, Faisal Mansoor > wrote: > > Hi, > > > > I am trying to build a suggester for a field which is both index and > > stored. The field is whitespace tokenized, lowercased, stemmed etc while > > indexing. > > > > It looks like that the indexed terms are used as a source for building > the > > suggester index. Which is what the following line in the suggester > > documentation also mentions. > > > > https://wiki.apache.org/solr/Suggester > > > > > > - > > > > field - if sourceLocation is empty then terms from this field in the > > index will be used when building the trie. > > > > I want to display the suggested value in UI, is it possible to use the > > stored value of the field rather than the indexed terms to build the > index. > > > > Here are the relevant definitions from solrconfig.xml and schema.xml. > > > > Thanks. > > Faisal > > > > solrconfig.xml > > > > > name="infix_suggest_analyzing"> > > > > infix_suggest_analyzing > > name="classname">org.apache.solr.spelling.suggest.Suggester > > > > name="lookupImpl">org.apache.solr.spelling.suggest.fst.AnalyzingInfixLookupFactory > > false > > > > > > autosuggest_fieldType > > > > name="dictionaryImpl">org.apache.solr.spelling.suggest.HighFrequencyDictionaryFactory > > DisplayName > > > > > > > > > > > > phrase_suggest > > > > > > > > > class="org.apache.solr.handler.component.SearchHandler"> > > > > explicit > > true > > infix_suggest_analyzing > > true > > 200 > > true > > 10 > > > > > > infix_suggest_analyzing > > > > > > > > > > schema.xml > > > > > > > positionIncrementGap="100"> > > > > > > > > > > > > > > > > > > > > > > > > > > pattern="([^\p{L}\p{M}\p{N}\p{Cs}]*[\p{L}\p{M}\p{N}\p{Cs}\_]+:)|([^\p{L}\p{M}\p{N}\p{Cs}])+" > > replacement=" " replace="all"/> > > > > > > > > > > > > > > > positionIncrementGap="100"> > > > > > > > words="stopwords.txt"/> > > > generateWordParts="1" generateNumberParts="1" catenateWords="1" > > catenateNumbers="1" catenateAll="0" splitOnCaseChange="1"/> > > > > > protected="protwords.txt"/> > > > > > > > > > > > > > ignoreCase="true" expand="true"/> > > > words="stopwords.txt"/> > > > generateWordParts="1" generateNumberParts="1" catenateWords="0" > > catenateNumbers="0" catenateAll="0" splitOnCaseChange="1"/> > > > > > protected="protwords.txt"/> > > > > > > > > > > > > > > > required="true" multiValued="false" /> > --001a11c29b5802a22a0508a138e3--