Oh, i should perhaps mention that EdgeNGrams will yield results a lot quicker 
than using wildcards at the cost of a larger index. You should, of course, use 
EdgeNGrams if you worry about performance and have a huge index and a number 
of queries per second.

> Then you don't need NGrams at all. A wildcard will suffice or you can use
> the TermsComponent.
> 
> If these strings are indexed as single tokens (KeywordTokenizer with
> LowercaseFilter) you can simply do field:app* to retrieve the "apple milk
> shake". You can also use the string field type but then you must make sure
> the values are already lowercased before indexing.
> 
> Be careful though, there is no query time analysis for wildcard (and fuzzy)
> queries so make sure
> 
> > Hi Eric,
> > 
> > What I want here is, lets say I have 3 documents like
> > 
> > ["pineapple vers apple", "milk with apple", "apple milk shake" ]
> > 
> > and If i search for "apple", it should return only "apple milk shake"
> > because that term alone starts with the letter "apple" which I typed in.
> > It should not bring others and if I type "milk" it should return only
> > "milk with apple"
> > 
> > I want an output Similar like a Google auto suggest.
> > 
> > Is there a way to achieve  this without encapsulating with double quotes.
> > 
> > Thanks,
> > 
> > Johnny

Reply via email to