private Document Doc(int id)
{
Document doc = new Document();
doc.Add(new StringField("id", "doc-" + id, Store.NO));
// make sure we don't set the doc's value to 0, to not confuse with a document that's missing values
doc.Add(new NumericDocValuesField("val", id + 1));
return doc;
}