I don't think there's an easy "built-in" way for Lucene to do this.

What you can do is implement a HitCollector to process each doc hit
and maintain a count for each user_group.  You'll need to preload a
doc_id -> user_group mapping.  (Take a look at the code for
FieldCacheImpl.getInts() for sample code).

~Heng

On 7/19/06, James liu <[EMAIL PROTECTED]> wrote:
You misunderstand.

This sql just tell what i wanna do.

i have five user_group and i wanna group result which lucene do.

2006/7/20, Otis Gospodnetic <[EMAIL PROTECTED]>:
>
> No.  Lucene is not a relational database and doesn't speak SQL.
>
> Otis
>
> ----- Original Message ----
> From: James liu <[EMAIL PROTECTED]>
> To: java-user@lucene.apache.org
> Sent: Wednesday, July 19, 2006 11:34:00 PM
> Subject: Can lucene query this result?
>
> for example:
>
> $sql = "select count(*), user_group from groups where uid>0 group by
> user_group;
>
>
> can lucene query this result?
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to