implement and test creating fields for Lucene docs