Re: pagination and groups

2011-07-02 Thread Yonik Seeley
2011/7/1 Tomás Fernández Löbbe tomasflo...@gmail.com:
 I'm not sure I understand what you want to do. To paginate with groups you
 can use start and rows as with ungrouped queries. with group.ngroups
 (Something I found a couple of days ago) you can show the total number of
 groups. group.limit tells Solr how many (max) documents you want to see
 for each group.

Right - just be aware that requesting the total number of groups (via
group.ngroups) is pretty memory and resource intensive - that's why
there is a separate option for it.

-Yonik
http://www.lucidimagination.com


Re: pagination and groups

2011-07-02 Thread Benson Margulies
Hey, I don't suppose you could easily tell me the rev in which ngroups arrived?

Also, how does ngroups compare to the 'matches' value inside each group?



On Sat, Jul 2, 2011 at 3:06 PM, Yonik Seeley yo...@lucidimagination.com wrote:
 2011/7/1 Tomás Fernández Löbbe tomasflo...@gmail.com:
 I'm not sure I understand what you want to do. To paginate with groups you
 can use start and rows as with ungrouped queries. with group.ngroups
 (Something I found a couple of days ago) you can show the total number of
 groups. group.limit tells Solr how many (max) documents you want to see
 for each group.

 Right - just be aware that requesting the total number of groups (via
 group.ngroups) is pretty memory and resource intensive - that's why
 there is a separate option for it.

 -Yonik
 http://www.lucidimagination.com



Re: pagination and groups

2011-07-02 Thread Yonik Seeley
On Sat, Jul 2, 2011 at 7:34 PM, Benson Margulies bimargul...@gmail.com wrote:
 Hey, I don't suppose you could easily tell me the rev in which ngroups 
 arrived?

1137037 I believe.  Grouping originated in Solr, was refactored to a
shared lucene/solr module, including the ability to get the total
number of groups, and then Solr's implementation was cut over to that.

 Also, how does ngroups compare to the 'matches' value inside each group?

The units for matches is currently number of documents, while the
units for ngroups is number of groups.


-Yonik
http://www.lucidimagination.com


Re: pagination and groups

2011-07-01 Thread Tomás Fernández Löbbe
I'm not sure I understand what you want to do. To paginate with groups you
can use start and rows as with ungrouped queries. with group.ngroups
(Something I found a couple of days ago) you can show the total number of
groups. group.limit tells Solr how many (max) documents you want to see
for each group.

On Fri, Jul 1, 2011 at 2:56 PM, Benson Margulies bimargul...@gmail.comwrote:

 I'm a bit puzzled while trying to adapt some pagination code in
 javascript to a grouped query.

 I'm using:

 'group' : 'true',
  'group.limit' : 5, // something to show ...
  'group.field' : [ 'bt.nearDupCluster', 'bt.nearStoryCluster' ]

 and displaying each field's worth in a tab. how do I work 'start', etc?



Re: pagination and groups

2011-07-01 Thread Benson Margulies
What takes the place of response.response.numFound?



2011/7/1 Tomás Fernández Löbbe tomasflo...@gmail.com:
 I'm not sure I understand what you want to do. To paginate with groups you
 can use start and rows as with ungrouped queries. with group.ngroups
 (Something I found a couple of days ago) you can show the total number of
 groups. group.limit tells Solr how many (max) documents you want to see
 for each group.

 On Fri, Jul 1, 2011 at 2:56 PM, Benson Margulies bimargul...@gmail.comwrote:

 I'm a bit puzzled while trying to adapt some pagination code in
 javascript to a grouped query.

 I'm using:

 'group' : 'true',
  'group.limit' : 5, // something to show ...
  'group.field' : [ 'bt.nearDupCluster', 'bt.nearStoryCluster' ]

 and displaying each field's worth in a tab. how do I work 'start', etc?




Re: pagination and groups

2011-07-01 Thread Tomás Fernández Löbbe
 are you using group.main=true?
I didn't see the code for this and the documentation doesn't specify it, but
I tried  group.ngroups=true and using group.main=true, the ngroups
attribute is not brought back. If you are not using group.main=true, then
by setting group.ngroups=true you'll see the value ngroups which means
the number of groups that matched the query.

NOTE: All this is in trunk, I'm not sure if it is on 3.3


On Fri, Jul 1, 2011 at 3:53 PM, Benson Margulies bimargul...@gmail.comwrote:

 What takes the place of response.response.numFound?



 2011/7/1 Tomás Fernández Löbbe tomasflo...@gmail.com:
  I'm not sure I understand what you want to do. To paginate with groups
 you
  can use start and rows as with ungrouped queries. with
 group.ngroups
  (Something I found a couple of days ago) you can show the total number of
  groups. group.limit tells Solr how many (max) documents you want to see
  for each group.
 
  On Fri, Jul 1, 2011 at 2:56 PM, Benson Margulies bimargul...@gmail.com
 wrote:
 
  I'm a bit puzzled while trying to adapt some pagination code in
  javascript to a grouped query.
 
  I'm using:
 
  'group' : 'true',
   'group.limit' : 5, // something to show ...
   'group.field' : [ 'bt.nearDupCluster', 'bt.nearStoryCluster' ]
 
  and displaying each field's worth in a tab. how do I work 'start', etc?
 
 



Re: pagination and groups

2011-07-01 Thread Benson Margulies
I'm using a version taken from the trunk some time ago. I'm not
setting groups.main, I just started setting groups.ngroups, and
nothing doing. So I guess I don't have a new enough grab from the
trunk.

2011/7/1 Tomás Fernández Löbbe tomasflo...@gmail.com:
  are you using group.main=true?
 I didn't see the code for this and the documentation doesn't specify it, but
 I tried  group.ngroups=true and using group.main=true, the ngroups
 attribute is not brought back. If you are not using group.main=true, then
 by setting group.ngroups=true you'll see the value ngroups which means
 the number of groups that matched the query.

 NOTE: All this is in trunk, I'm not sure if it is on 3.3


 On Fri, Jul 1, 2011 at 3:53 PM, Benson Margulies bimargul...@gmail.comwrote:

 What takes the place of response.response.numFound?



 2011/7/1 Tomás Fernández Löbbe tomasflo...@gmail.com:
  I'm not sure I understand what you want to do. To paginate with groups
 you
  can use start and rows as with ungrouped queries. with
 group.ngroups
  (Something I found a couple of days ago) you can show the total number of
  groups. group.limit tells Solr how many (max) documents you want to see
  for each group.
 
  On Fri, Jul 1, 2011 at 2:56 PM, Benson Margulies bimargul...@gmail.com
 wrote:
 
  I'm a bit puzzled while trying to adapt some pagination code in
  javascript to a grouped query.
 
  I'm using:
 
  'group' : 'true',
   'group.limit' : 5, // something to show ...
   'group.field' : [ 'bt.nearDupCluster', 'bt.nearStoryCluster' ]
 
  and displaying each field's worth in a tab. how do I work 'start', etc?