Skip to content

Support additional grouping/collapsing request parameters #1

Open
wants to merge 2 commits into from

2 participants

@raphaelcm

Hi, I added support for a few more of the field grouping request parameters listed here: http://wiki.apache.org/solr/FieldCollapsing#Request_Parameters

@alindeman
Owner

This is great! Thank you. I'm a stickler for specs, but I also don't mind writing them if you're tied up.

@raphaelcm

Ah yes, will do!

@alindeman
Owner

You must have Solr running to run some of the tests. There are details toward the bottom of the README.

@raphaelcm
@raphaelcm

Ok just added specs, let me know what you think.

@alindeman
Owner

I honestly don't know much about how pagination does or doesn't work with grouping at this point. If you want to look into it, feel free! Or file an issue about it on the sunspot/sunspot project.

I'm going to review this code now and likely merge it in soon.

@alindeman
Owner

Why would you need to set group.format through Sunspot?

@alindeman
Owner

Or group.ngroups? I'm not seeing a need for this really either.

@raphaelcm

Is there a way to set those fields without the additions? I'm fairly new to sunspot, so maybe I missed something.

For an app I'm working on, I use the ngroups count for pagination, since neither numFound nor matches is accurate when you limit the number of results per group (I limit to 1 per group, so ngroups is the accurate count).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.