Mailing List Archive

query parser deafults
Hi,

I've been looking at the query parser source code and have come to a loose end.

I'm attempting to modify the query parser so that all terms default to required.

Please can someone advise how to do this.

Thanks,

Richard Taylor
New Scientist Developer
Re: query parser deafults [ In reply to ]
One person has already done this and has posted the solution to the
list. I suggest checking the mail archives for either lucene-user or
lucene-dev. The contributor's name is Peter Halacy (sp?).

I am hoping that we can include his solution in one of the future
releases.

Otis


--- Richard Taylor <richard.taylor@newscientist.com> wrote:
> Hi,
>
> I've been looking at the query parser source code and have come to a
> loose end.
>
> I'm attempting to modify the query parser so that all terms default
> to required.
>
> Please can someone advise how to do this.
>
> Thanks,
>
> Richard Taylor
> New Scientist Developer
>
>


__________________________________________________
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.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: query parser deafults [ In reply to ]
I found the solution here:

http://www.mail-archive.com/lucene-dev@jakarta.apache.org/msg00973.html

Thanks.

Richard Taylor
New Scientist Developer

----- Original Message -----
From: "Otis Gospodnetic" <otis_gospodnetic@yahoo.com>
To: "Lucene Users List" <lucene-user@jakarta.apache.org>
Sent: Tuesday, May 21, 2002 2:09 PM
Subject: Re: query parser deafults


> One person has already done this and has posted the solution to the
> list. I suggest checking the mail archives for either lucene-user or
> lucene-dev. The contributor's name is Peter Halacy (sp?).
>
> I am hoping that we can include his solution in one of the future
> releases.
>
> Otis
>
>
> --- Richard Taylor <richard.taylor@newscientist.com> wrote:
> > Hi,
> >
> > I've been looking at the query parser source code and have come to a
> > loose end.
> >
> > I'm attempting to modify the query parser so that all terms default
> > to required.
> >
> > Please can someone advise how to do this.
> >
> > Thanks,
> >
> > Richard Taylor
> > New Scientist Developer
> >
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> LAUNCH - Your Yahoo! Music Experience
> http://launch.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>


--
To unsubscribe, e-mail: <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>
Re: query parser deafults [ In reply to ]
> I've been looking at the query parser source code and have come to a
> loose end.

Not surprising! Many people have a hard time wrapping their head around
parsers; the logic is not straightforward.

> I'm attempting to modify the query parser so that all terms default
> to required.

First, are you sure you want to do this? The search engine will rank
documents that contain all the terms above documents containing only some.

Anyway, what you want is to change the calls to addClause() to include
the modifier MOD_REQ; this wil make all terms required.


--
To unsubscribe, e-mail: <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>
RE: query parser deafults [ In reply to ]
I sent my implementation to the list a while ago (http://www.mail-archive.com/lucene-dev@jakarta.apache.org/msg00973.html)

I hope it helps.

peter

> -----Original Message-----
> From: Brian Goetz [mailto:brian@quiotix.com]
> Sent: Tuesday, May 21, 2002 11:00 PM
> To: Lucene Users List
> Subject: Re: query parser deafults
>
>
> > I've been looking at the query parser source code and have come to a
> > loose end.
>
> Not surprising! Many people have a hard time wrapping their
> head around
> parsers; the logic is not straightforward.
>
> > I'm attempting to modify the query parser so that all terms default
> > to required.
>
> First, are you sure you want to do this? The search engine will rank
> documents that contain all the terms above documents
> containing only some.
>
> Anyway, what you want is to change the calls to addClause() to include
> the modifier MOD_REQ; this wil make all terms required.
>
>
> --
> 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>