Return-Path: Delivered-To: apmail-lucene-solr-user-archive@minotaur.apache.org Received: (qmail 54527 invoked from network); 15 Mar 2011 03:53:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 15 Mar 2011 03:53:19 -0000 Received: (qmail 85919 invoked by uid 500); 15 Mar 2011 03:53:16 -0000 Delivered-To: apmail-lucene-solr-user-archive@lucene.apache.org Received: (qmail 85775 invoked by uid 500); 15 Mar 2011 03:53:16 -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 85758 invoked by uid 99); 15 Mar 2011 03:53:15 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Mar 2011 03:53:15 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of kai.schlamp@googlemail.com designates 209.85.210.176 as permitted sender) Received: from [209.85.210.176] (HELO mail-iy0-f176.google.com) (209.85.210.176) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Mar 2011 03:53:09 +0000 Received: by iyj12 with SMTP id 12so303308iyj.35 for ; Mon, 14 Mar 2011 20:52:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; bh=DAefRDzppcp1Nfli7a16juEAlDvPERRawZDHL/82G8Q=; b=PwSM+pUvN89+FuR90/miY6mxyoFu3lmuBg87r4xBcawyD6rGbQpj4/5j3w7PxmKESK OTD2/Er+RZ1FUUQTofzGBZhx7swDHobExBi8xygxzEmhGTMz2d+CU4Zm/EVif978ay1A 17GUeAgi6XfR4FJ1RnnGrht7Xbylc7v3XB0kI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; b=qnGo0b5lREGcutEfQC2gQkiI41KVz9rqP+c2mVXYVuVu2V0cg6sAkGB9sFZDEEYe+T D4+mNkuq9fmChGFNBxWZW/0sZOs6Wnm/j1zjvZO42oa63Ls/S4p+oQHG9xlFke/yxZiU RSXoz2J3YJA2t6cAggfNiMIPij2R3fsNgZwZA= MIME-Version: 1.0 Received: by 10.42.247.202 with SMTP id md10mr6581306icb.342.1300161168361; Mon, 14 Mar 2011 20:52:48 -0700 (PDT) Sender: kai.schlamp@googlemail.com Received: by 10.42.221.200 with HTTP; Mon, 14 Mar 2011 20:52:48 -0700 (PDT) In-Reply-To: References: <856322.71060.qm@web111305.mail.gq1.yahoo.com> Date: Tue, 15 Mar 2011 04:52:48 +0100 X-Google-Sender-Auth: skXwUFDzWiwSonA9Sj655sIQ2_I Message-ID: Subject: Re: Different options for autocomplete/autosuggestion From: Kai Schlamp 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 @Robert: That sounds interesting and very flexible, but also like a lot of work. This approach also doesn't seem to allow querying Solr directly by using Ajax ... one of the big benefits in my opinion when using Solr. @Bill: There are some things I don't like about the Suggester component. It doesn't seem to allow infix searches (at least it is not mentioned in the Wiki or elsewhere). It also uses a separate index that has to be rebuild independently of the main index. And it doesn't support any filter queries. The Lucid Imagination blog also describes a further autosuggest approach (http://www.lucidimagination.com/blog/2009/09/08/auto-suggest-from= -popular-queries-using-edgengrams/). The disadvantage here is that the source documents must have distinct fields (resp. the dih selects must provide distinct data). Otherwise duplications would come up in the Solr query result, cause of the document nature of Solr. In my opinion field collapsing seems to be most promising for a full featured autosuggestion solution. Unfortunately it is not available for Solr 1.4.x or 3.x (I tried patching those branches several times without success). 2011/3/15 Bill Bell : > http://lucidworks.lucidimagination.com/display/LWEUG/Spell+Checking+and+A= ut > omatic+Completion+of+User+Queries > > For Auto-Complete, find the following section in the solrconfig.xml file > for the collection: > =A0 > =A0 > =A0 =A0 > =A0 =A0 =A0autocomplete > =A0 =A0 =A0 name=3D"classname">org.apache.solr.spelling.suggest.Suggester > =A0 =A0 =A0 name=3D"lookupImpl">org.apache.solr.spelling.suggest.jaspell.JaspellLooku= p tr> > =A0 =A0 =A0autocomplete > =A0 =A0 =A0true > > =A0 =A0 > > > > > On 3/14/11 8:16 PM, "Andy" wrote: > >>Can you provide more details? Or a link? >> >>--- On Mon, 3/14/11, Bill Bell wrote: >> >>> See how Lucid Enterprise does it... A >>> bit differently. >>> >>> On 3/14/11 12:14 AM, "Kai Schlamp" >>> wrote: >>> >>> >Hi. >>> > >>> >There seems to be several options for implementing an >>> >autocomplete/autosuggestions feature with Solr. I am >>> trying to >>> >summarize those possibilities together with their >>> advantages and >>> >disadvantages. It would be really nice to read some of >>> your opinions. >>> > >>> >* Using N-Gram filter + text field query >>> >+ available in stable 1.4.x >>> >+ results can be boosted >>> >+ sorted by best matches >>> >- may return duplicate results >>> > >>> >* Facets >>> >+ available in stable 1.4.x >>> >+ no duplicate entries >>> >- sorted by count >>> >- may need an extra N-Gram field for infix queries >>> > >>> >* Terms >>> >+ available in stable 1.4.x >>> >+ infix query by using regex in 3.x >>> >- only prefix query in 1.4.x >>> >- regexp may be slow (just a guess) >>> > >>> >* Suggestions >>> >? Did not try that yet. Does it allow infix queries? >>> > >>> >* Field Collapsing >>> >+ no duplications >>> >- only available in 4.x branch >>> >? Does it work together with highlighting? That would >>> be a big plus. >>> > >>> >What are your experiences regarding >>> autocomplete/autosuggestion with >>> >Solr? Any additions, suggestions or corrections? What >>> do you prefer? >>> > >>> >Kai >>> >>> >>> >> >> >> > > > --=20 Dr. med. Kai Schlamp Am Fort Elisabeth 17 55131 Mainz Germany Phone +49-177-7402778 Email: schlamp@gmx.de