search: answer from the index once it holds a month of mail

Search went to the index only once the corpus's walk had gone all the way down, which for a Gmail account of 100,000 messages takes a day and a half of the app being open; until then every search cost quota and waited on Gmail. The walks now note how far down they have kept every message: when a page of the server's list is all kept, the oldest of its messages dates the corpus's reach, in a new record (old builds pass over it) and in the index's header, in what was a reserved field. A message read only because its thread was, which may be years older, does not count. Once the reach is 30 days back, a search the index can answer is answered by it. Until the walk is done, the desk says the results go back only to that day, "Found 3 in the mail since Oct 25", and offers f, which asks the server for the search instead; what it finds joins the list, and its next pages come from the server too.


Author rockorager.dev
Date Commit Parent 27da05cb