lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Heng Mei" <heng....@gmail.com>
Subject Re: Can lucene query this result?
Date Thu, 20 Jul 2006 06:02:38 GMT
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 <liuping.james@gmail.com> 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 <otis_gospodnetic@yahoo.com>:
> >
> > No.  Lucene is not a relational database and doesn't speak SQL.
> >
> > Otis
> >
> > ----- Original Message ----
> > From: James liu <liuping.james@gmail.com>
> > 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: 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