Я новичок в 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?? Помоги мне, пожалуйста
Вы можете добавить следующие параметры (начало и строки):
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'
});
Тогда это сработает
},jsonp: 'json.wrf'});
или нужно больше кода;