Thanks a lot!! Exactly what I was looking for..

That solved this!
On Sun, Aug 14, 2011 at 6:23 PM, Martijn v Groningen <
martijn.v.gronin...@gmail.com> wrote:

> Hi Omri,
>
> SOLR-2637 was concerned with adding grouped response parsing. There is no
> convenience method for grouping, but you can use the normal
> SolrQuery#set(...) methods to enable grouping.
> The following code should enable grouping via SolrJ api:
> SolrQuery query = new SolrQuery();
> query.set(GroupParams.GROUP, true);
> query.set(GroupParams.GROUP_FIELD, "your_field");
>
> Martijn
>
> On 14 August 2011 16:53, Omri Cohen <omri...@gmail.com> wrote:
>
> > Hi All,
> >
> > I am trying to group by results using SolrJ. According to
> > https://issues.apache.org/jira/browse/SOLR-2637 the feature was added,
> so
> > I
> > upgraded to SolrJ-3.4-Snapshot and I can see the necessary method for
> > grouping in QueryResponse, which is getGroupResponse(). The only thing
> left
> > that I don't understand is where do I set on which field to group. There
> is
> > no method that looks like it does so on the SolrQuery object..
> >
> > Ideas anyone ?
> >
> > thanks,
> > Omri
> >
>
>
>
> --
> Met vriendelijke groet,
>
> Martijn van Groningen
>

Reply via email to