0
votes

I am using solrnet 0.40 grouping functionality. And I am grouping on a single field (say filename).

But in the results I would like to display multiple hits for the group (filename).

  • FileName-1

    • hit-1, hit-2....hit-n
  • FileName-2

    • hit-1, hit-2....

and so on....

Is there any way grouping gives me the functionality to get results clustered other than the obvious way of running a secondary query for each group?

TIA

1
In grouping you do get all the documents for the group limited by group.limit. are you asking about those ? Maybe am not clear for the question. Can you elaborate.Jayendra
yep, that was it. I had not set the group.limit (which defaults to 1) . Setting it to desired value got it working. ThanksMikos

1 Answers

2
votes

Just needed to set the grouping params to desired value. For example, have set it to 10 to get 10 results per group.

 Grouping = new GroupingParameters()
        {
            Fields = new [] { "manu_exact" },
            Format = GroupingFormat.Grouped,
            Limit = 10,
        }