Ok ! According to your requirements , it is a very simple scenario. The *FSTLookup* approach should do the trick for you! Take a look to the official documentation to see the parameter supported [1] ( it is in Solr but it gives to you the idea of the parameter required) . This section of my blog should help as well (it is for Solr but Solr uses the underlying Lucene core to provide the suggestions)[2]
[1] "FSTLookupFactory > An automaton-based lookup. This implementation is slower to build, but > provides the lowest memory cost. We recommend using this implementation > unless you need more sophisticated matching results, in which case you > should use the Jaspell implementation. > This implementation uses the following additional properties: > > - exactMatchFirst: If true, the default, exact suggestions are > returned first, even if they are prefixes or other strings in the FST have > larger weights. > > > - weightBuckets: The number of separate buckets for weights which the > suggester will use while building its dictionary." > > [2] http://alexbenedetti.blogspot.co.uk/2015/07/solr-you-complete-me.html#nine Cheers On 25 November 2015 at 12:05, Bhaskar <bhaskar1...@gmail.com> wrote: > > *Is analysis needed in the suggester ?* > [Bhaskar] No > > Do you want to provide suggestions according to an analyser processing > the suggestions and user query ? > Example : > user typing receiver > And the system returning the Antenna records ? > > [Bhaskar] No, not needed.. > > *Do you want infix suggestions ?* > [Bhaskar] not looking for suggestions...Just I want to beginning of the > field value. I.e. if we type Ante then we should get all the strings > which are started with Ante. > > I am looking as below . > > [image: Inline image 1] > When user is typing then only matched records should shown. > > *Suggestions of the whole content of a field or only few tokens ?* > Do you want only few tokens or the entire field value ? > [Bhaskar] I want entire field. > > Regards, > Bhaskar > > > On Wed, Nov 25, 2015 at 4:12 PM, Alessandro Benedetti < > abenede...@apache.org> wrote: > >> Let me answer in line : >> >> On 23 November 2015 at 17:20, Bhaskar <bhaskar1...@gmail.com> wrote: >> >> > Hi, >> > I have one column in the data base and it is having below data( it can >> have >> > 5000 to 30000 rows) >> > >> > Fenway Antenna Dipole Top CH00 with Coaxial Cable Length 140mm >> > Fenway Antenna Dipole Side CH01 with Coaxial Cable Length 220mm >> > Fenway Antenna Slot Front CH02 with Coaxial Cable Length 220mm >> > ... >> > LIMELIGHT ANTENNA-D CABLE >> > >> > >> > I think I want fuzzy suggestions only... for example... >> > when user types *Fenway *then the words starting with *Fenway *should >> > come.. i.e. >> > >> > Fenway Antenna Dipole Top CH00 with Coaxial Cable Length 140mm >> > Fenway Antenna Dipole Side CH01 with Coaxial Cable Length 220mm >> > Fenway Antenna Slot Front CH02 with Coaxial Cable Length 220mm >> > >> >> >> This is not fuzzy search/autocompletion at all. >> Fuzzy search is a technique to return results containing String variation >> from the original query. >> In particular as variation Solr uses the Levenshtein distance edit >> measure. >> The max edit distance supported is 2, where an edit operationis a >> single-character edit (i.e. insertion, deletion or substitution) . >> >> >> > >> > Based on the user input the result should change. if user typed *Fenway >> > Antenna Dipole *then >> > >> > Fenway Antenna Dipole Top CH00 with Coaxial Cable Length 140mm >> > Fenway Antenna Dipole Side CH01 with Coaxial Cable Length 220mm >> > >> > like this based on the typed data then the result should change. >> > >> > >> > Could you please suggest what is the best way to achieve this( may be >> some >> > samples for the same). >> > Please let me know if I miss any info you required. >> > >> >> Unfortunately you didn't answer to my questions, let me simplify them : >> >> *Is analysis needed in the suggester ?* >> >> Do you want to provide suggestions according to an analyser processing >> the suggestions and user query ? >> Example : >> user typing receiver >> And the system returning the Antenna records ? >> >> *Do you want infix suggestions ?* >> >> user typing "ante" and getting the Antenna records as results. >> ( looking for suggestions not at the beginning of the field value) >> >> *Do you want fuzzy suggestions ?* >> See above about the Levenshtein distance. >> >> *Suggestions of the whole content of a field or only few tokens ?* >> >> Do you want only few tokens or the entire field value ? >> This should be already answered, and I guess you want the entire field >> value. >> >> Cheers >> >> >> > >> > Thank you very much. >> > >> > Regards, >> > Bhaskar >> > >> > >> > >> > On Mon, Nov 23, 2015 at 10:24 PM, Alessandro Benedetti < >> > abenede...@apache.org> wrote: >> > >> > > Can you list us your requirements ? >> > > >> > > Is analysis needed in the suggester ? >> > > Do you want infix suggestions ? >> > > Do you want fuzzy suggestions ? >> > > Suggestions of the whole content of a field or only few tokens ? >> > > >> > > Starting from that you can take a look to the suggester component and >> all >> > > the different implementations. >> > > There are a lot of Lookup strategy, very specific depending on the use >> > > case. >> > > >> > > Cheers >> > > >> > > On 23 November 2015 at 12:39, Bhaskar <bhaskar1...@gmail.com> wrote: >> > > >> > > > Hi, >> > > > >> > > > I am new Lucene Auto suggest. >> > > > Could you please some share the lucene auto suggest sample >> > > > applications/code.. >> > > > >> > > > My use case is: >> > > > I have the data in the database. I would like write some auto >> suggest >> > on >> > > > the data base data. >> > > > >> > > > i.e. we have some text box in UI. when user is trying to enter some >> > thing >> > > > we have to auto suggest based on the user input. >> > > > >> > > > Thanks in advance for help. >> > > > >> > > > -- >> > > > Keep Smiling.... >> > > > Thanks & Regards >> > > > Bhaskar. >> > > > Mobile:9866724142 >> > > > >> > > >> > > >> > > >> > > -- >> > > -------------------------- >> > > >> > > 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 >> > > >> > >> > >> > >> > -- >> > Keep Smiling.... >> > Thanks & Regards >> > Bhaskar. >> > Mobile:9866724142 >> > >> >> >> >> -- >> -------------------------- >> >> 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 >> > > > > -- > Keep Smiling.... > Thanks & Regards > Bhaskar. > Mobile:9866724142 > -- -------------------------- 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