Re: An interesting approach to grouping

2015-01-27 Thread Jim . Musil
Here’s the issue: https://issues.apache.org/jira/browse/SOLR-7046 Jim On 1/27/15, 12:44 PM, "Ryan Josal" wrote: >This is great, thanks Jim. Your patch worked and the sorting solution >meets the goal, although group.limit seems like it could cut various >results out of the middle of the resul

Re: An interesting approach to grouping

2015-01-27 Thread Jim . Musil
Here’s the issue: On 1/27/15, 12:44 PM, "Ryan Josal" wrote: >This is great, thanks Jim. Your patch worked and the sorting solution >meets the goal, although group.limit seems like it could cut various >results out of the middle of the result set. I will play around with it >and see if it prov

Re: An interesting approach to grouping

2015-01-27 Thread Jim . Musil
Yes, I’m trying to pin down exactly what conditions cause the bug to appear. It seems as though it’s only when using the query function. Jim On 1/27/15, 12:44 PM, "Ryan Josal" wrote: >This is great, thanks Jim. Your patch worked and the sorting solution >meets the goal, although group.limit se

Re: An interesting approach to grouping

2015-01-27 Thread Ryan Josal
This is great, thanks Jim. Your patch worked and the sorting solution meets the goal, although group.limit seems like it could cut various results out of the middle of the result set. I will play around with it and see if it proves helpful. Can you let me know the Jira so I can keep an eye on it

Re: An interesting approach to grouping

2015-01-27 Thread Jim . Musil
Interestingly, you can do something like this: group=true& group.main=true& group.func=rint(scale(query({!type=edismax v=$q}),0,20))& // puts into buckets group.limit=20& // gives you 20 from each bucket group.sort=category asc // this will sort by category within each bucket, but this can be a f

Re: An interesting approach to grouping

2015-01-27 Thread Jim . Musil
When using group.main=true, the results are not mixed as you expect: "If true, the result of the last field grouping command is used as the main result list in the response, using group.format=simple” https://wiki.apache.org/solr/FieldCollapsing Jim On 1/27/15, 9:22 AM, "Ryan Josal" wrote: >

Re: An interesting approach to grouping

2015-01-27 Thread Ryan Josal
Thanks a lot! I'll try this out later this morning. If group.func and group.field don't combine the way I think they might, I'll try to look for a way to put it all in group.func. On Tuesday, January 27, 2015, Jim.Musil wrote: > I¹m not sure the query you provided will do what you want, BUT I

Re: An interesting approach to grouping

2015-01-27 Thread Jim . Musil
I¹m not sure the query you provided will do what you want, BUT I did find the bug in the code that is causing the NullPointerException. The variable context is supposed to be global, but when prepare() is called, it is only defined in the scope of that function. Here¹s the simple patch: Index: c

An interesting approach to grouping

2015-01-26 Thread Ryan Josal
I have an index of products, and these products have a "category" which we can say for now is a good approximation of its location in the store. I'm investigating altering the ordering of the results so that the categories aren't interlaced as much... so that the results are a little bit more grou