Hi Salman, I agree with Alan. Just configure your schema with the proper analysers . For the field you want to use for suggestions you are likely to need simply this fieldType :
<fieldType name="text_suggestion" class="solr.TextField" positionIncrementGap="100"> <analyzer type="index"> <tokenizer class="solr.StandardTokenizerFactory"/> <filter class="solr.LowerCaseFilterFactory"/> <filter class="solr.EdgeNGramFilterFactory" minGramSize="1" maxGramSize="20"/> </analyzer> <analyzer type="query"> <tokenizer class="solr.StandardTokenizerFactory"/> <filter class="solr.LowerCaseFilterFactory"/> </analyzer> </fieldType> This is a very sample example, please adapt it to your use case. Cheers On 2 December 2015 at 09:41, Alan Woodward <a...@flax.co.uk> wrote: > Hi Salman, > > It sounds as though you want to do a normal search against a special > 'suggest' field, that's been indexed with edge ngrams. > > Alan Woodward > www.flax.co.uk > > > On 2 Dec 2015, at 09:31, Salman Ansari wrote: > > > Hi, > > > > I am looking for auto-complete in Solr but on top of just auto complete I > > want as well to return the data completely (not just suggestions), so I > > want to get back the ids, and other fields in the whole document. I tried > > the following 2 approaches but each had issues > > > > 1) Used the /suggest component but that returns a very specific format > > which looks like I cannot customize. I want to return the whole document > > that has a matching field and not only the suggestion list. So for > example, > > if I write "hard" it returns the results in a specific format as follows > > > > <arr name="suggestion"> <str>hard drive</str> > > <str>hard disk</str> </arr> > > > > Is there a way to get back additional fields with suggestions? > > > > 2) Tried the normal /select component but that does not do auto-complete > on > > portion of the word. So, for example, if I write the query as "bara" it > > DOES NOT return "barack obama". Any suggestions how to solve this? > > > > > > Regards, > > Salman > > -- -------------------------- Benedetti Alessandro Visiting card : http://about.me/alessandro_benedetti "Tyger, tyger burning bright In the forests of the night, What immortal hand or eye Could frame thy fearful symmetry?" William Blake - Songs of Experience -1794 England