You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by none none <ko...@lycos.com> on 2002/06/10 18:01:29 UTC

Within Search

hi,
i asked some help about this feature some time ago, but no answer.
What do i need to do is the WithinPhraseSearch. An example can be:

search for:  "car w/10 rent".

This mean, look for documents that contains 'car' and within 10 words 'rent'. So, what i think i need is:

1.Change the QueryParser.jj to reconize the operator "w/xx" as the within operator.

2.The QueryParser should return a PhraseQuery with a "slop" factor equals to '10' for the example above. Should also ignore "w/xx" if xx is not numeric.

An other question: what should i do if i want the query operator (AND,OR,NOT,etc) to be case insensitive? what should i change inside the QueryParser.jj ? 

PLEASE HELP, because i really don't know how to use the "JavaCC" utility.

Thanks,
bye.

 


_______________________________________________________
WIN a first class trip to Hawaii.  Live like the King of Rock and Roll
on the big Island. Enter Now!
http://r.lycos.com/r/sagel_mail/http://www.elvis.lycos.com/sweepstakes

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Within Search

Posted by Otis Gospodnetic <ot...@yahoo.com>.
Hello,

I'm sending this to lucene-user list, as that seems more appropriate.
I haven't used Lucene's slop feature, but it looks like both
QueryParser and PhraseQuery have support for slop.  I am not sure what
the syntax for it is, but if nothign else you should be able to call
setSlop(int) method on an instance of PhraseQuery.

Oh, it looks like you missed it in the Query Parser Syntax document:
http://jakarta.apache.org/lucene/docs/queryparsersyntax.html

Otis


--- none none <ko...@lycos.com> wrote:
> hi,
> i asked some help about this feature some time ago, but no answer.
> What do i need to do is the WithinPhraseSearch. An example can be:
> 
> search for:  "car w/10 rent".
> 
> This mean, look for documents that contains 'car' and within 10 words
> 'rent'. So, what i think i need is:
> 
> 1.Change the QueryParser.jj to reconize the operator "w/xx" as the
> within operator.
> 
> 2.The QueryParser should return a PhraseQuery with a "slop" factor
> equals to '10' for the example above. Should also ignore "w/xx" if xx
> is not numeric.
> 
> An other question: what should i do if i want the query operator
> (AND,OR,NOT,etc) to be case insensitive? what should i change inside
> the QueryParser.jj ? 
> 
> PLEASE HELP, because i really don't know how to use the "JavaCC"
> utility.
> 
> Thanks,
> bye.
> 
>  
> 
> 
> _______________________________________________________
> WIN a first class trip to Hawaii.  Live like the King of Rock and
> Roll
> on the big Island. Enter Now!
>
http://r.lycos.com/r/sagel_mail/http://www.elvis.lycos.com/sweepstakes
> 
> --
> To unsubscribe, e-mail:  
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 


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

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>