Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6862281
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T02:38:33+00:00 2026-05-27T02:38:33+00:00

As mentioned in the question I am trying to utilize Solr’s result grouping feature

  • 0

As mentioned in the question I am trying to utilize Solr’s result grouping feature to (surprise) group my search results. From what I understand Solrnet 0.3.1 supports field collapsing but is broken for Solr because Solr replaced field collapsing with results grouping in version 3.3.

I have seen that Solrnet 0.4.0 alpha supports grouping however I don’t think it is possible for me to utilize that for my current project as it is alpha and I would have a tough time justifying it to the customer. Unless someone can list some fairly compelling arguments to the contrary that an alpha would be ‘unsafe’.

I have also tried adding the group parameters by setting the ExtraParams like so:

 ExtraParams = new Dictionary<string, string>{{"group", "true"}, {"group.field", "fieldName"}}

This throws a NullReferenceException:

         at SolrNet.Impl.ResponseParsers.ResultsResponseParser`1.Parse(XmlDocument xml, SolrQueryResults`1 results) in c:\prg\SolrNet\svn\SolrNet\Impl\ResponseParsers\ResultsResponseParser.cs:line 35
       at SolrNet.Impl.SolrQueryResultParser`1.Parse(String r) in c:\prg\SolrNet\svn\SolrNet\Impl\SolrQueryResultParser.cs:line 46
       at SolrNet.Impl.SolrQueryExecuter`1.Execute(ISolrQuery q, QueryOptions options) in c:\prg\SolrNet\svn\SolrNet\Impl\SolrQueryExecuter.cs:line 309
       at SolrNet.Impl.SolrBasicServer`1.Query(ISolrQuery query, QueryOptions options) in c:\prg\SolrNet\svn\SolrNet\Impl\SolrBasicServer.cs:line 83
       at SolrNet.Impl.SolrServer`1.Query(String q, QueryOptions options) in c:\prg\SolrNet\svn\SolrNet\Impl\SolrServer.cs:line 78
       at RSearch.Core.SearchIndex.Search(String term, Int32 page, Int32 pageSize) in D:\Development\LESA-LARIAT\LariatMapper\Core\SearchIndex.cs:line 153
       at RSearch.Controllers.SearchController.Index(SearchInfo searchInfo) in D:\Development\LESA-LARIAT\LariatWeb\Controllers\SearchController.cs:line 16
       at lambda_method(Closure , ControllerBase , Object[] )
       at System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters)
       at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters)
       at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
       at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass15.
<InvokeActionMethodWithFilters>b__12()
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation)

My guess at why it does this is Solrnet doesn’t understand the structure of results passed back to it so it throws this exception.

I would really like to be able to do this as I feel it’s a little ‘dirty’ to use Solrnet to leverage all of Solr’s features but have the grouping done via LINQ after the query is returned. If it is my only option I don’t mind using it though.

Thank you for your help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T02:38:34+00:00Added an answer on May 27, 2026 at 2:38 am

    In short: no, there is no way with that combo of Solr/SolrNet versions. SolrNet 0.3.1 implemented field collapsing for a nightly build of Solr, when it just started implementing field collapsing (it wasn’t called ‘grouping’ then). After that, field collapsing was completely overhauled in Solr (now called ‘result grouping’), and the SolrNet 0.3.1 implementation was left obsolete.

    Support for result grouping was added shortly after that and released with 0.4.0a1.

    I recommend going with 0.4.0a1. It’s not ‘unsafe’ as in ‘unstable’ at all:

    • I’m using nightly builds in production without any issues.
    • Download count for 0.4.0a1 is pretty high, almost as much as 0.3.1
    • SolrNet is developed using continuous integration and thoroughly tested.
    • As I explained in the release notes, ‘alpha’ to me means thoroughly unit-tested, but not API-frozen (API may slightly change in the GA release).

    Doing grouping client-side (i.e. LINQ) is not really an option, as you have to fetch all the documents to do so properly. It’s just like wanting to to pagination + sorting client-side with a relational database.

    You may also be able to backport result grouping to 0.3.1, but IMHO is really pointless and a waste of time.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

As I mentioned in this question, I am trying to implement a feature in
I'm trying to set up a search display controller to handle async results from
I was trying to answer the question mentioned here by passing the reference to
From the link ( which is mentioned in Question ) my question is that
As mentioned in the question, I am trying to generate an XML output( for
I am trying to implement the same code that was mentioned in this question
As I mentioned in the question, I am trying to create a button and
EDIT: the script mentioned in the question, and the other script pointed among the
I just saw this mentioned in Stack Overflow question Best WYSIWYG CSS editor and
This was mentioned in my other question and I thought it might be useful

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.