mirror of https://github.com/apache/lucene.git
SOLR-2662: fix 'start' handling when a query isn't cached
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1149746 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
2ff9fa27e7
commit
f8dd8a6ce3
|
@ -369,6 +369,12 @@ Bug Fixes
|
|||
prior to the float value.
|
||||
(Markus Jelsma, hossman)
|
||||
|
||||
* SOLR-2662: When Solr is configured to have no queryResultCache, the
|
||||
"start" parameter was not honored and the documents returned were
|
||||
0 through start+offset. (Markus Jelsma, yonik)
|
||||
|
||||
|
||||
|
||||
Other Changes
|
||||
----------------------
|
||||
|
||||
|
|
|
@ -1151,10 +1151,9 @@ public class SolrIndexSearcher extends IndexSearcher implements SolrInfoMBean {
|
|||
getDocListNC(qr,cmd);
|
||||
//Parameters: cmd.getQuery(),theFilt,cmd.getSort(),0,supersetMaxDoc,cmd.getFlags(),cmd.getTimeAllowed(),responseHeader);
|
||||
}
|
||||
if (key != null) {
|
||||
superset = out.docList;
|
||||
out.docList = superset.subset(cmd.getOffset(),cmd.getLen());
|
||||
}
|
||||
|
||||
superset = out.docList;
|
||||
out.docList = superset.subset(cmd.getOffset(),cmd.getLen());
|
||||
}
|
||||
|
||||
// lastly, put the superset in the cache if the size is less than or equal
|
||||
|
|
|
@ -101,6 +101,10 @@ public class TestFiltering extends SolrTestCaseJ4 {
|
|||
);
|
||||
assertEquals(0, DelegatingCollector.setLastDelegateCount - prevCount);
|
||||
|
||||
// test that offset works when not caching main query
|
||||
assertJQ(req("q","{!cache=false}*:*", "start","2", "rows","1", "sort","val_i asc", "fl","val_i")
|
||||
,"/response/docs==[{'val_i':3}]"
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue