lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doron Cohen <DOR...@il.ibm.com>
Subject Re: Grouping over multiple fields
Date Tue, 25 Jul 2006 18:27:36 GMT
Just realized that the <some text> part should also be grouped, so checked
that this variation also works:

qtxt = "some text AND  ( AUTHOR_NAME:krish OR EMPLOYEE_NAME:krish )";
--->   field:some +field:text +(AUTHOR_NAME:krish EMPLOYEE_NAME:krish)

qtxt = "(some text) AND  ( AUTHOR_NAME:krish OR EMPLOYEE_NAME:krish )";
--->   +(field:some field:text) +(AUTHOR_NAME:krish EMPLOYEE_NAME:krish)

qtxt = "<some text> AND  ( AUTHOR_NAME:krish OR EMPLOYEE_NAME:krish )";
--->   field:<some +field:text> +(AUTHOR_NAME:krish EMPLOYEE_NAME:krish)

Last case just demonstrates that '<' is not part of Lucene's query syntax
(http://lucene.apache.org/java/docs/queryparsersyntax.html).

- Doron

> I think the problem might be in the <some query> part.
> At least with Lucene 2.0, parsing result is as expected -
>   String qtxt  = "some text AND  ( AUTHOR_NAME:krish OR
EMPLOYEE_NAME:krish
> )";
>   Query q = new QueryParser("field",new
WhitespaceAnalyzer()).parse(qtxt);
>   System.out.println(q);
>   --> field:some +field:text +(AUTHOR_NAME:krish EMPLOYEE_NAME:krish)
>
> - Doron
>
> "Krishnendra Nandi" <krishnendra.nandi@hewitt.com> wrote on 25/07/2006
> 03:38:51:
>
> > Hi All,
> >
> > Can anybody help me out on this ..?
> >
> > I have to search for a particular value over multiple fields and need
to
> > know if grouping is allowed over multiple fields
> >
> > eg.
> >
> > <some query>    AND   ( AUTHOR_NAME:krish OR EMPLOYEE_NAME:krish )
> >
> > Introducing paranthesis "(" is giving me lexical error
> >
> > Thanks and Regards
> > Krishnendra Nandi
> >
> > The information contained in this e-mail and any accompanying documents
> > may contain information that is confidential or otherwise protected
> > from disclosure. If you are not the intended recipient of this message,
> > or if this message has been addressed to you in error, please
> > immediately alert the sender by reply e-mail and then delete this
> message,
> > including any attachments. Any dissemination, distribution or other use
> of
> > the contents of this message by anyone other than the intended
recipient
> > is strictly prohibited.
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message