lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Miles Barr <mi...@magpie.net>
Subject Re: Grouping over multiple fields
Date Tue, 25 Jul 2006 10:56:28 GMT
Krishnendra Nandi wrote:

>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 
>  
>

I don't see anything wrong with this, but maybe the query parser doesn't 
like it. You could construct it programatically:

1. Use the QueryParser on <some query>
2. Create TermQuerys for AUTHOR_NAME and EMPLOYEE_NAME
3. Construct the necessary BooleanQuery

If it is the query parser and you need free text queries take a look at 
the JavaCC source and find the bit that handles nested queries and see 
why it doesn't like your field restrictions.




Miles

---------------------------------------------------------------------
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