如何从solr中获取超过10个文档

How to get more than 10 documents from solr

我是 solr 的新手,我有一个 solr 应用程序 运行 并开始从 angular 应用程序查询它 我能够从 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中获取所有文档的索引?? 请帮助我

您可以添加以下参数(startrows):

 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'
               });

然后就可以了