Mailing List Archive

Search using wild characters
Hi


Query qr=
QueryParser.parse("*deep","name",new SimpleAnalyzer());
While searching the number of hits returned by the above
query is 0.
But when I removed * and used full value 'pradeep' there
It returned correct number of hits.

What may be reason?. I am using latest Lucene build.

Thanks in advance
Pradeep

--------------------------------------------------------------
Robosoft Technologies, Mangalore, India



--
To unsubscribe, e-mail: <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>
Re: Search using wild characters [ In reply to ]
This is a FAQ.
http://jguru.com/faq/view.jsp?EID=480194

Otis

--- Pradeep Kumar K <pradeepk@robosoftin.com> wrote:
> Hi
>
>
> Query qr=
> QueryParser.parse("*deep","name",new SimpleAnalyzer());
> While searching the number of hits returned by the above
> query is 0.
> But when I removed * and used full value 'pradeep' there
> It returned correct number of hits.
>
> What may be reason?. I am using latest Lucene build.
>
> Thanks in advance
> Pradeep
>
> --------------------------------------------------------------
> Robosoft Technologies, Mangalore, India
>
>
>
> --
> To unsubscribe, e-mail:
> <mailto:lucene-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:lucene-user-help@jakarta.apache.org>
>


__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

--
To unsubscribe, e-mail: <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>
Re: Search using wild characters [ In reply to ]
I read somewhere that you can not have * as the first char of the term.

- gene

----- Original Message -----
From: "Pradeep Kumar K" <pradeepk@robosoftin.com>
To: <lucene-user@jakarta.apache.org>
Sent: Tuesday, June 25, 2002 9:10 AM
Subject: Search using wild characters


> Hi
>
>
> Query qr=
> QueryParser.parse("*deep","name",new SimpleAnalyzer());
> While searching the number of hits returned by the above
> query is 0.
> But when I removed * and used full value 'pradeep' there
> It returned correct number of hits.
>
> What may be reason?. I am using latest Lucene build.
>
> Thanks in advance
> Pradeep
>
> --------------------------------------------------------------
> Robosoft Technologies, Mangalore, India
>
>
>
> --
> To unsubscribe, e-mail:
<mailto:lucene-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
<mailto:lucene-user-help@jakarta.apache.org>
>
>



--
To unsubscribe, e-mail: <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>
RE: Search using wild characters [ In reply to ]
Postfix wildcards of the form "*term" has never been supported in Lucene
because it requires a slow linear search through the entire list of words.
If you really need this kind of search, an inelegant hack I have used is to
invert all words (eg, "pradeep" into "peedarp") and store them in a
different field. Thus when a user tries to search for "*deep", invert the
term into "peed*" and search in the inverted field.



Dave Kor Kian Wei
Consultant
Product Engineering
NexusEdge Technologies Pte. Ltd.
6 Aljunied Ave 3, #01-02 (Level 4)
Singapore 389932
Tel : (+65)848-2552
Fax : (+65)747-4536
Web : www.nexusedge.com

> -----Original Message-----
> From: Pradeep Kumar K [mailto:pradeepk@robosoftin.com]
> Sent: Wednesday, June 26, 2002 12:11 AM
> To: lucene-user@jakarta.apache.org
> Subject: Search using wild characters
>
>
> Hi
>
>
> Query qr=
> QueryParser.parse("*deep","name",new SimpleAnalyzer());
> While searching the number of hits returned by the above
> query is 0.
> But when I removed * and used full value 'pradeep' there
> It returned correct number of hits.
>
> What may be reason?. I am using latest Lucene build.
>
> Thanks in advance
> Pradeep
>
> --------------------------------------------------------------
> Robosoft Technologies, Mangalore, India
>
>
>
> --
> To unsubscribe, e-mail:
> <mailto:lucene-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:lucene-user-help@jakarta.apache.org>
>
>
>



--
To unsubscribe, e-mail: <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>