Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 91667 invoked from network); 24 May 2006 09:30:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 24 May 2006 09:30:35 -0000 Received: (qmail 30515 invoked by uid 500); 24 May 2006 09:30:16 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 30462 invoked by uid 500); 24 May 2006 09:30:16 -0000 Mailing-List: contact java-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@lucene.apache.org Delivered-To: mailing list java-user@lucene.apache.org Received: (qmail 30434 invoked by uid 500); 24 May 2006 09:30:16 -0000 Delivered-To: apmail-jakarta-lucene-user@jakarta.apache.org Received: (qmail 30415 invoked by uid 99); 24 May 2006 09:30:16 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 May 2006 02:30:16 -0700 X-ASF-Spam-Status: No, hits=1.1 required=10.0 tests=EXTRA_MPART_TYPE,HTML_FONT_BIG,HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of Vikas_Khengare@symantec.com designates 143.127.12.111 as permitted sender) Received: from [143.127.12.111] (HELO silver.veritas.com) (143.127.12.111) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 May 2006 02:30:14 -0700 Received: from sxchcon2-int.veritas.com (HELO SVLXCHCON2.enterprise.veritas.com) ([10.137.18.172]) by silver.veritas.com with ESMTP; 24 May 2006 02:29:50 -0700 X-BrightmailFiltered: true X-Brightmail-Tracker: AAAAAA== X-IronPort-AV: i="4.05,165,1146466800"; d="jpg'145?scan'145,208,217,145"; a="38461196:sNHT81470284" Received: from PUNAXCHECNPIN02.enterprise.veritas.com ([10.217.161.22]) by SVLXCHCON2.enterprise.veritas.com with Microsoft SMTPSVC(6.0.3790.211); Wed, 24 May 2006 02:29:49 -0700 Received: from ITPXCHCLN1.enterprise.veritas.com ([10.216.17.2]) by PUNAXCHECNPIN02.enterprise.veritas.com with Microsoft SMTPSVC(6.0.3790.1433); Wed, 24 May 2006 14:59:45 +0530 X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/related; type="multipart/alternative"; boundary="----_=_NextPart_001_01C67F14.97AE38EE" Subject: Re: Can I do "Google Suggest" Like Search? - - - from - - -vikas Date: Wed, 24 May 2006 14:59:45 +0530 Message-ID: <2B63BBC3F2F85B45A985FAD965DE969ECA1C48@ITPXCHCLN1.enterprise.veritas.com> X-MS-Has-Attach: yes X-MS-TNEF-Correlator: Thread-Topic: Re: Can I do "Google Suggest" Like Search? - - - from - - -vikas Thread-Index: AcZ/FJf0jxuqriKZTYeO7sSFcCWjyg== From: "Vikas Khengare" To: Cc: , X-OriginalArrivalTime: 24 May 2006 09:29:45.0263 (UTC) FILETIME=[97FCABF0:01C67F14] X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------_=_NextPart_001_01C67F14.97AE38EE Content-Type: multipart/alternative; boundary="----_=_NextPart_002_01C67F14.97AE38EE" ------_=_NextPart_002_01C67F14.97AE38EE Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Zhenjian YU =20 Means Now I have 2 options 1. WildCardQuery 2. PrefixQuery A] If I use WildCardQuery it will search "a" in whole word and then return result e.g If I type "a" then it will return all results which contain "a" in their spelling. But I want when user type "a" it will show only "America" & "Asia" And when I type "as" then it will show only "Asia". Does WildCardQuery has that capacity to do? Because this will send query to search engine as "a*" and "as*" ...... =20 B] I think so PrefixQuery will do it. Because It will search for those terms in index who has "a" or "as" as prefix. =20 Thanks =20 =20 =20 Hi Vikas, =20 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. =20 Yes, you can also implement your own filter to filter out the results which don't starting with "a". =20 Either way is a solution. =20 Best Regards, Zhenjian =20 On 5/24/06, Vikas Khengare wrote: >=20 >=20 >=20 > Hi Zhenjian YU >=20 >=20 >=20 > I have implemented that with AJAX Search But when I type "*a*"=20 > in textbox. It gives me all results which contains letter "a". >=20 > So I am getting "*A*merica", "*A*sia", "Fl*a*g" & "Zhenji*a*n" also. >=20 > But in actual I want only "America" & "Asia". >=20 >=20 >=20 > Thanks >=20 >=20 >=20 > -----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 - -=20 > -vikas >=20 >=20 >=20 > hi, *vikas, > *the ajax way should work for you. > while in the lucene part, you should do something to handle the prefix > query. >=20 > Best Regards, >=20 > Zhenjian >=20 >=20 >=20 > On 5/24/06, Vikas Khengare wrote: >=20 > > >=20 > > Hi Friend > > I want to perform search like "Google search" which will give >=20 > > suggestions to user. >=20 > > So when I type *"L"* it will give me search options names which will > start >=20 > > from "L". Then when I will type *"Lu"* then it should give me=20 > > options > for >=20 > > names which are starting from "Lu". & so on ...... >=20 > > 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)? =20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D =20 with best regards from ......... vikas r. khengare Veritas Software India Private Ltd.=20 Symantec Corporation Pune, India =20 [ Enjoy your life today.... because yesterday had gone.... and tommorow may never come . ] =20 ------_=_NextPart_002_01C67F14.97AE38EE Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi Zhenjian = YU

 

      Means Now I = have 2 options

1.    = WildCardQuery

2.       = PrefixQuery

A] If I use = WildCardQuery it will search “a” in whole word and then return = result

      e.g If I type “a” then it will return all results which contain = “a” in their spelling.

But I want when = user type “a” it will show only “America” & “Asia

And when I type = “as” then it will show only “Asia”.

Does WildCardQuery = has that capacity to do?

Because this will = send query to search engine as “a*” and “as*” = ……

 

B] I think so = PrefixQuery will do it. Because It will search for those terms in index who has = “a” or “as” as prefix.

 

Thanks

      =

 

 

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

> = >           &nb= sp; 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)?

 

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D

 

with best = regards

from .........

vikas r. khengare

Veritas = Software India Private Ltd.

Symantec = Corporation

Pune, = India

      &nbs= p;            = ;     [ = Enjoy your life today.... because yesterday had gone.... and = tommorow may never = come . ]

 

------_=_NextPart_002_01C67F14.97AE38EE-- ------_=_NextPart_001_01C67F14.97AE38EE--