lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zhenjian YU" <zhenj...@gmail.com>
Subject Re: Can I do "Google Suggest" Like Search? - - - from - - -vikas
Date Wed, 24 May 2006 08:28:19 GMT
Hi Vikas,

Seems that you can use the WildCardQuery to do this, just put "a*" as the
query term.
But take caution to use WildCardQuery, because it can bring the performance
of your system down.

Yes, you can also implement your own filter to filter out the results which
don't starting with "a".

Either way is a solution.

Best Regards,
Zhenjian

On 5/24/06, Vikas Khengare <Vikas_Khengare@symantec.com> wrote:
>
>
>
> Hi Zhenjian YU
>
>
>
>       I have implemented that with AJAX Search But when I type "*a*" in
> textbox. It gives me all results which contains letter "a".
>
> So I am getting "*A*merica", "*A*sia", "Fl*a*g" & "Zhenji*a*n" also.
>
> But in actual I want only "America" & "Asia".
>
>
>
> Thanks
>
>
>
> -----Original Message-----
> From: Zhenjian YU [mailto:zhenjian@gmail.com]
> Sent: Wednesday, May 24, 2006 1:33 PM
> To: java-user@lucene.apache.org
> Cc: lucene-user@jakarta.apache.org; java-dev@lucene.apache.org
> Subject: Re: Can I do "Google Suggest" Like Search? - - - from - - -vikas
>
>
>
> hi, *vikas,
>
>
>
> *the ajax way should work for you.
>
>
>
> while in the lucene part, you should do something to handle the prefix
>
> query.
>
>
>
> Best Regards,
>
> Zhenjian
>
>
>
> On 5/24/06, Vikas Khengare <Vikas_Khengare@symantec.com> wrote:
>
> >
>
> >  Hi Friend
>
> >
>
> >             I want to perform search like "Google search" which will
> give
>
> > suggestions to user.
>
> >
>
> > So when I type *"L"* it will give me search options names which will
> start
>
> > from "L". Then when I will type *"Lu"* then it should give me options
> for
>
> > names which are starting from "Lu". & so on ……
>
> >
>
> >
>
> >
>
> > 1) Does Lucene provide any API for doing so?
>
> >
>
> > 2) Can I use Sort / Filter classes for it?
>
> >
>
> > 3) Or do I need to handle it in java (may be any other language)?
>
> >
>
>
>
>
> ==================================================================================================
>
> * *
>
> *with best regards*
>
> *from .........*
>
> *vikas r. khengare*
>
> Veritas Software India Private Ltd.
>
> Symantec Corporation
>
> Pune, India
>
> **
>
> *                        **[ Enjoy your life today.... because yesterday
> had gone.... and **tommorow may never come** . ]*
>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message