You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Yonik Seeley <yo...@lucidimagination.com> on 2011/07/12 22:48:09 UTC
Re: svn commit: r1145748 - in /lucene/dev/branches/branch_3x/solr/src:
java/org/apache/solr/search/Grouping.java test/org/apache/solr/TestGroupingSearch.java
Since this is a fix to a released version, we should probably have a
CHANGES entry?
-Yonik
http://www.lucidimagination.com
On Tue, Jul 12, 2011 at 4:17 PM, <mv...@apache.org> wrote:
> Author: mvg
> Date: Tue Jul 12 20:17:37 2011
> New Revision: 1145748
>
> URL: http://svn.apache.org/viewvc?rev=1145748&view=rev
> Log:
> fixed bug when start is bigger than rows and format is simple that zero documents are returned even if there are documents to display.
>
> Modified:
> lucene/dev/branches/branch_3x/solr/src/java/org/apache/solr/search/Grouping.java
> lucene/dev/branches/branch_3x/solr/src/test/org/apache/solr/TestGroupingSearch.java
>
> Modified: lucene/dev/branches/branch_3x/solr/src/java/org/apache/solr/search/Grouping.java
> URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/solr/src/java/org/apache/solr/search/Grouping.java?rev=1145748&r1=1145747&r2=1145748&view=diff
> ==============================================================================
> --- lucene/dev/branches/branch_3x/solr/src/java/org/apache/solr/search/Grouping.java (original)
> +++ lucene/dev/branches/branch_3x/solr/src/java/org/apache/solr/search/Grouping.java Tue Jul 12 20:17:37 2011
> @@ -541,10 +541,6 @@ public class Grouping {
> }
>
> int len = docsGathered - offset;
> - if (offset > len) {
> - len = 0;
> - }
> -
> int[] docs = ArrayUtils.toPrimitive(ids.toArray(new Integer[ids.size()]));
> float[] docScores = ArrayUtils.toPrimitive(scores.toArray(new Float[scores.size()]));
> DocSlice docSlice = new DocSlice(offset, len, docs, docScores, getMatches(), maxScore);
>
> Modified: lucene/dev/branches/branch_3x/solr/src/test/org/apache/solr/TestGroupingSearch.java
> URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/solr/src/test/org/apache/solr/TestGroupingSearch.java?rev=1145748&r1=1145747&r2=1145748&view=diff
> ==============================================================================
> --- lucene/dev/branches/branch_3x/solr/src/test/org/apache/solr/TestGroupingSearch.java (original)
> +++ lucene/dev/branches/branch_3x/solr/src/test/org/apache/solr/TestGroupingSearch.java Tue Jul 12 20:17:37 2011
> @@ -227,6 +227,21 @@ public class TestGroupingSearch extends
> );
> }
>
> + @Test
> + public void testGroupingSimpleFormatStartBiggerThanRows() throws Exception {
> + assertU(add(doc("id", "1")));
> + assertU(add(doc("id", "2")));
> + assertU(add(doc("id", "3")));
> + assertU(add(doc("id", "4")));
> + assertU(add(doc("id", "5")));
> + assertU(commit());
> +
> + assertJQ(
> + req("q", "*:*", "start", "2", "rows", "1", "group", "true", "group.field", "id", "group.main", "true"),
> + "/response=={'numFound':5,'start':2,'docs':[{'id':'3'}]}"
> + );
> + }
> +
> static String f = "foo_s1";
> static String f2 = "foo2_i";
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
Re: svn commit: r1145748 - in /lucene/dev/branches/branch_3x/solr/src:
java/org/apache/solr/search/Grouping.java test/org/apache/solr/TestGroupingSearch.java
Posted by Simon Willnauer <si...@googlemail.com>.
On Tue, Jul 12, 2011 at 10:48 PM, Yonik Seeley
<yo...@lucidimagination.com> wrote:
> Since this is a fix to a released version, we should probably have a
> CHANGES entry?
+1
>
> -Yonik
> http://www.lucidimagination.com
>
>
>
> On Tue, Jul 12, 2011 at 4:17 PM, <mv...@apache.org> wrote:
>> Author: mvg
>> Date: Tue Jul 12 20:17:37 2011
>> New Revision: 1145748
>>
>> URL: http://svn.apache.org/viewvc?rev=1145748&view=rev
>> Log:
>> fixed bug when start is bigger than rows and format is simple that zero documents are returned even if there are documents to display.
>>
>> Modified:
>> lucene/dev/branches/branch_3x/solr/src/java/org/apache/solr/search/Grouping.java
>> lucene/dev/branches/branch_3x/solr/src/test/org/apache/solr/TestGroupingSearch.java
>>
>> Modified: lucene/dev/branches/branch_3x/solr/src/java/org/apache/solr/search/Grouping.java
>> URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/solr/src/java/org/apache/solr/search/Grouping.java?rev=1145748&r1=1145747&r2=1145748&view=diff
>> ==============================================================================
>> --- lucene/dev/branches/branch_3x/solr/src/java/org/apache/solr/search/Grouping.java (original)
>> +++ lucene/dev/branches/branch_3x/solr/src/java/org/apache/solr/search/Grouping.java Tue Jul 12 20:17:37 2011
>> @@ -541,10 +541,6 @@ public class Grouping {
>> }
>>
>> int len = docsGathered - offset;
>> - if (offset > len) {
>> - len = 0;
>> - }
>> -
>> int[] docs = ArrayUtils.toPrimitive(ids.toArray(new Integer[ids.size()]));
>> float[] docScores = ArrayUtils.toPrimitive(scores.toArray(new Float[scores.size()]));
>> DocSlice docSlice = new DocSlice(offset, len, docs, docScores, getMatches(), maxScore);
>>
>> Modified: lucene/dev/branches/branch_3x/solr/src/test/org/apache/solr/TestGroupingSearch.java
>> URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/solr/src/test/org/apache/solr/TestGroupingSearch.java?rev=1145748&r1=1145747&r2=1145748&view=diff
>> ==============================================================================
>> --- lucene/dev/branches/branch_3x/solr/src/test/org/apache/solr/TestGroupingSearch.java (original)
>> +++ lucene/dev/branches/branch_3x/solr/src/test/org/apache/solr/TestGroupingSearch.java Tue Jul 12 20:17:37 2011
>> @@ -227,6 +227,21 @@ public class TestGroupingSearch extends
>> );
>> }
>>
>> + @Test
>> + public void testGroupingSimpleFormatStartBiggerThanRows() throws Exception {
>> + assertU(add(doc("id", "1")));
>> + assertU(add(doc("id", "2")));
>> + assertU(add(doc("id", "3")));
>> + assertU(add(doc("id", "4")));
>> + assertU(add(doc("id", "5")));
>> + assertU(commit());
>> +
>> + assertJQ(
>> + req("q", "*:*", "start", "2", "rows", "1", "group", "true", "group.field", "id", "group.main", "true"),
>> + "/response=={'numFound':5,'start':2,'docs':[{'id':'3'}]}"
>> + );
>> + }
>> +
>> static String f = "foo_s1";
>> static String f2 = "foo2_i";
>>
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
Re: svn commit: r1145748 - in /lucene/dev/branches/branch_3x/solr/src:
java/org/apache/solr/search/Grouping.java test/org/apache/solr/TestGroupingSearch.java
Posted by Martijn v Groningen <ma...@gmail.com>.
Sorry forgot to add that.... I'll add an entry to CHANGES
On 12 July 2011 22:59, Mark Miller <ma...@gmail.com> wrote:
> +1 - a bug should get a CHANGES entry and JIRA issue generally.
>
> On Jul 12, 2011, at 4:48 PM, Yonik Seeley wrote:
>
> > Since this is a fix to a released version, we should probably have a
> > CHANGES entry?
> >
> > -Yonik
> > http://www.lucidimagination.com
> >
> >
> >
> > On Tue, Jul 12, 2011 at 4:17 PM, <mv...@apache.org> wrote:
> >> Author: mvg
> >> Date: Tue Jul 12 20:17:37 2011
> >> New Revision: 1145748
> >>
> >> URL: http://svn.apache.org/viewvc?rev=1145748&view=rev
> >> Log:
> >> fixed bug when start is bigger than rows and format is simple that zero
> documents are returned even if there are documents to display.
> >>
> >> Modified:
> >>
> lucene/dev/branches/branch_3x/solr/src/java/org/apache/solr/search/Grouping.java
> >>
> lucene/dev/branches/branch_3x/solr/src/test/org/apache/solr/TestGroupingSearch.java
> >>
> >> Modified:
> lucene/dev/branches/branch_3x/solr/src/java/org/apache/solr/search/Grouping.java
> >> URL:
> http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/solr/src/java/org/apache/solr/search/Grouping.java?rev=1145748&r1=1145747&r2=1145748&view=diff
> >>
> ==============================================================================
> >> ---
> lucene/dev/branches/branch_3x/solr/src/java/org/apache/solr/search/Grouping.java
> (original)
> >> +++
> lucene/dev/branches/branch_3x/solr/src/java/org/apache/solr/search/Grouping.java
> Tue Jul 12 20:17:37 2011
> >> @@ -541,10 +541,6 @@ public class Grouping {
> >> }
> >>
> >> int len = docsGathered - offset;
> >> - if (offset > len) {
> >> - len = 0;
> >> - }
> >> -
> >> int[] docs = ArrayUtils.toPrimitive(ids.toArray(new
> Integer[ids.size()]));
> >> float[] docScores = ArrayUtils.toPrimitive(scores.toArray(new
> Float[scores.size()]));
> >> DocSlice docSlice = new DocSlice(offset, len, docs, docScores,
> getMatches(), maxScore);
> >>
> >> Modified:
> lucene/dev/branches/branch_3x/solr/src/test/org/apache/solr/TestGroupingSearch.java
> >> URL:
> http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/solr/src/test/org/apache/solr/TestGroupingSearch.java?rev=1145748&r1=1145747&r2=1145748&view=diff
> >>
> ==============================================================================
> >> ---
> lucene/dev/branches/branch_3x/solr/src/test/org/apache/solr/TestGroupingSearch.java
> (original)
> >> +++
> lucene/dev/branches/branch_3x/solr/src/test/org/apache/solr/TestGroupingSearch.java
> Tue Jul 12 20:17:37 2011
> >> @@ -227,6 +227,21 @@ public class TestGroupingSearch extends
> >> );
> >> }
> >>
> >> + @Test
> >> + public void testGroupingSimpleFormatStartBiggerThanRows() throws
> Exception {
> >> + assertU(add(doc("id", "1")));
> >> + assertU(add(doc("id", "2")));
> >> + assertU(add(doc("id", "3")));
> >> + assertU(add(doc("id", "4")));
> >> + assertU(add(doc("id", "5")));
> >> + assertU(commit());
> >> +
> >> + assertJQ(
> >> + req("q", "*:*", "start", "2", "rows", "1", "group", "true",
> "group.field", "id", "group.main", "true"),
> >> + "/response=={'numFound':5,'start':2,'docs':[{'id':'3'}]}"
> >> + );
> >> + }
> >> +
> >> static String f = "foo_s1";
> >> static String f2 = "foo2_i";
> >>
> >>
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> > For additional commands, e-mail: dev-help@lucene.apache.org
> >
>
> - Mark Miller
> lucidimagination.com
>
>
>
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>
>
--
Met vriendelijke groet,
Martijn van Groningen
Re: svn commit: r1145748 - in /lucene/dev/branches/branch_3x/solr/src: java/org/apache/solr/search/Grouping.java test/org/apache/solr/TestGroupingSearch.java
Posted by Mark Miller <ma...@gmail.com>.
+1 - a bug should get a CHANGES entry and JIRA issue generally.
On Jul 12, 2011, at 4:48 PM, Yonik Seeley wrote:
> Since this is a fix to a released version, we should probably have a
> CHANGES entry?
>
> -Yonik
> http://www.lucidimagination.com
>
>
>
> On Tue, Jul 12, 2011 at 4:17 PM, <mv...@apache.org> wrote:
>> Author: mvg
>> Date: Tue Jul 12 20:17:37 2011
>> New Revision: 1145748
>>
>> URL: http://svn.apache.org/viewvc?rev=1145748&view=rev
>> Log:
>> fixed bug when start is bigger than rows and format is simple that zero documents are returned even if there are documents to display.
>>
>> Modified:
>> lucene/dev/branches/branch_3x/solr/src/java/org/apache/solr/search/Grouping.java
>> lucene/dev/branches/branch_3x/solr/src/test/org/apache/solr/TestGroupingSearch.java
>>
>> Modified: lucene/dev/branches/branch_3x/solr/src/java/org/apache/solr/search/Grouping.java
>> URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/solr/src/java/org/apache/solr/search/Grouping.java?rev=1145748&r1=1145747&r2=1145748&view=diff
>> ==============================================================================
>> --- lucene/dev/branches/branch_3x/solr/src/java/org/apache/solr/search/Grouping.java (original)
>> +++ lucene/dev/branches/branch_3x/solr/src/java/org/apache/solr/search/Grouping.java Tue Jul 12 20:17:37 2011
>> @@ -541,10 +541,6 @@ public class Grouping {
>> }
>>
>> int len = docsGathered - offset;
>> - if (offset > len) {
>> - len = 0;
>> - }
>> -
>> int[] docs = ArrayUtils.toPrimitive(ids.toArray(new Integer[ids.size()]));
>> float[] docScores = ArrayUtils.toPrimitive(scores.toArray(new Float[scores.size()]));
>> DocSlice docSlice = new DocSlice(offset, len, docs, docScores, getMatches(), maxScore);
>>
>> Modified: lucene/dev/branches/branch_3x/solr/src/test/org/apache/solr/TestGroupingSearch.java
>> URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/solr/src/test/org/apache/solr/TestGroupingSearch.java?rev=1145748&r1=1145747&r2=1145748&view=diff
>> ==============================================================================
>> --- lucene/dev/branches/branch_3x/solr/src/test/org/apache/solr/TestGroupingSearch.java (original)
>> +++ lucene/dev/branches/branch_3x/solr/src/test/org/apache/solr/TestGroupingSearch.java Tue Jul 12 20:17:37 2011
>> @@ -227,6 +227,21 @@ public class TestGroupingSearch extends
>> );
>> }
>>
>> + @Test
>> + public void testGroupingSimpleFormatStartBiggerThanRows() throws Exception {
>> + assertU(add(doc("id", "1")));
>> + assertU(add(doc("id", "2")));
>> + assertU(add(doc("id", "3")));
>> + assertU(add(doc("id", "4")));
>> + assertU(add(doc("id", "5")));
>> + assertU(commit());
>> +
>> + assertJQ(
>> + req("q", "*:*", "start", "2", "rows", "1", "group", "true", "group.field", "id", "group.main", "true"),
>> + "/response=={'numFound':5,'start':2,'docs':[{'id':'3'}]}"
>> + );
>> + }
>> +
>> static String f = "foo_s1";
>> static String f2 = "foo2_i";
>>
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>
- Mark Miller
lucidimagination.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org