我是solr新手,我有一个solr应用程序正在运行,并开始从角应用程序中查询它,我从solr中获得了结果,但是我只得到了头10个文档,但是还有更多的文档索引了我的代码:
angular.element.ajax({
url: "http://localhost:8983/solr/food/select",
data: {
"q": $scope.searchString,
"wt": "json"
},
traditional: true,
cache: true,
async: true,
dataType: 'jsonp',
success: function (data) {
//and when we get the query back we
//stick the results in the scope
$scope.$apply(function () {
$scope.results = data.response.docs;
console.log("result from solr is ",$scope.results)
});
} });
},
jsonp: 'json.wrf'
});
如何从solr中获得所有文档的索引??请帮帮我
发布于 2015-08-29 13:43:47
您可以添加以下参数(、start、和rows):
angular.element.ajax({
url: "http://localhost:8983/solr/food/select",
data: {
"q": $scope.searchString,
"start":10,//starting from this index
"rows":20,//count of results
"wt": "json"
},
traditional: true,
cache: true,
async: true,
dataType: 'jsonp',
success: function (data) {
//and when we get the query back we
//stick the results in the scope
$scope.$apply(function () {
$scope.results = data.response.docs;
console.log("result from solr is ",$scope.results)
});
} });
},
jsonp: 'json.wrf'
});
然后它就能工作了
https://stackoverflow.com/questions/32286643
复制相似问题