我有以下Solr查询:
import UIKit
import CoreLocation
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate, CLLocationManagerDelegate {
var window: UIWindow?
lazy var locationManager: CLLocationManager! = {
let manager = CLLocationManager()
manager.desiredAccuracy = kCLLocationAccuracyBest
manager.pausesLocationUpdatesAutomatically = false
manager.delegate = self
manager.requestAlwaysAuthorization()
return manager
}()
var lastNotifictionDate = NSDate()
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
let settings = UIUserNotificationSettings(forTypes: [.Alert], categories: nil)
UIApplication.sharedApplication().registerUserNotificationSettings(settings)
locationManager.startUpdatingLocation()
return true
}
func locationManager(manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) {
// Do something interesting.
// I make this function return immediately until 10sec passed after previous notification.
let now = NSDate()
if lastNotifictionDate.dateByAddingTimeInterval(10).compare(now) == .OrderedDescending {
//NSLog("Not yet")
return
}
//NSLog("It's time")
lastNotifictionDate = now
// Fire local notification, without sound configured for simplicity.
let notification = UILocalNotification()
notification.alertBody = "Hello"
UIApplication.sharedApplication().presentLocalNotificationNow(notification)
}
// ... other methods are untouched ...
}
在回复中,它显示找到了1000条记录。但是,Solr仅返回前5行。正如您所看到的,我添加了http://local:8983/solr/select?start=0&rows=1000&
q=id:5332527&
expand=true&expand.q=param_name_s:s21mag&expand.field=_root_
,但这没有帮助。
如何强制Solr返回所有1000行?
答案 0 :(得分:3)