     // MARK: State management
     // ----------------------
     
+    public var nextSequenceNumber: Int = 0
+    
     /// The state that will be used for the next search.
     /// It can be modified at will. It is not taken into account until the `search()` method is called; then it is
     /// copied and transferred to `requestedState`.

    
    private func _doNextRequest() {
        var operation: NSOperation!
        let state = State(copy: requestedState)
        let completionHandler: CompletionHandler = { (content: [String: AnyObject]?, error: NSError?) in
            // IMPORTANT: Mark the state as received.
            self.receivedState = state
            if let index = self.pendingRequests.indexOf(operation) {
                self.pendingRequests.removeAtIndex(index)
            }
            self.handleResults(content, error: error)
        }
        let query = Query(copy: state.query)

        /// Whether the current page is the initial page for this search state.
        public var isInitialPage: Bool { return initialPage == page }
        
        /// This state's sequence number.
        public var sequenceNumber: Int = 0
        
        /// Construct a default state.
        public init() {
        }
