This what the spellchecker does. It makes a separate Lucene index of n-gram letters and searches those. Works pretty well and it is outside the main index. I did an experimental variation indexing word pairs as phrases, and it worked well too.
Lance Norskog -----Original Message----- From: Ryan McKinley [mailto:[EMAIL PROTECTED] Sent: Thursday, April 24, 2008 2:18 PM To: solr-user@lucene.apache.org Subject: Re: Solr with Auto-suggest On Apr 24, 2008, at 12:25 PM, Rantjil Bould wrote: > Hi Group, > I was asked in my project to implement google suggest kind > of functionality for searching help system. I have seen one thread > http://www.mail-archive.com/solr-user@lucene.apache.org/ > msg06739.html which > deals with the way to index if large index. But I am not able to get > much information to start with. I am using JQuery's plugin for auto- > suggest and query field is a large text(appx 2000 char long). I am > just wondering how can I extract all tokens for any character typed by > user? Somebody might have already implemented the same functionality > and I would appreciate your help on this, even a hint might be a great > help. I don't think there is a magic one-size-fits-all solution to this, only a set of approaches you will need to modify for your specific index. You will need to modify the jquery plugin to grab results from a solr query. For starters that can be just a standard query whatever. Unless your index is small, you will likely need to configure your index with special fields to use for the auto-complete search. This is the approach pointed to in SOLR-357. Eseentially you index: "Bould" as "b" "bo" "bou" boul" bould". ryan . Checked by AVG. Version: 8.0.100 / Virus Database: 269.23.4/1397 - Release Date: 25.04.2008 7:42