protected virtual Document newDoc(String id, IShape shape)
{
Document doc = new Document();
doc.Add(new StringField("id", id, Field.Store.YES));
if (shape != null)
{
foreach (Field f in strategy.CreateIndexableFields(shape))
{
doc.Add(f);
}
if (storeShape)
doc.Add(new StoredField(strategy.FieldName, shape.toString()));//not to be parsed; just for debug
}
return doc;
}