d1.add(buildMetaField("salary", "04500"));
Field sf = new StringField("testStored", "stored", Store.YES);
d1.add(sf);
FieldType ft = new FieldType();
ft.setStored(false);
ft.setIndexed(true);
ft.setTokenized(true);
ft.setStoreTermVectors(true);
ft.setStoreTermVectorPositions(false);
ft.setStoreTermVectorOffsets(false);
Field tvf = new Field("tv", "bobo bobo lucene lucene lucene test", ft);
d1.add(tvf);
FieldType ftPositions = new FieldType();
ftPositions.setStored(false);
ftPositions.setIndexed(true);
ftPositions.setTokenized(true);
ftPositions.setStoreTermVectors(true);
ftPositions.setStoreTermVectorPositions(true);
ftPositions.setStoreTermVectorOffsets(false);
tvf = new Field("tvPositions", "bobo bobo lucene lucene lucene test", ftPositions);
d1.add(tvf);
FieldType ftOffsets = new FieldType();
ftOffsets.setStored(false);
ftOffsets.setIndexed(true);
ftOffsets.setTokenized(true);
ftOffsets.setStoreTermVectors(true);
ftOffsets.setStoreTermVectorPositions(false);
ftOffsets.setStoreTermVectorOffsets(true);
tvf = new Field("tvOffsets", "bobo bobo lucene lucene lucene test", ftOffsets);
d1.add(tvf);
FieldType ftPositionsAndOffsets = new FieldType();
ftPositionsAndOffsets.setStored(false);
ftPositionsAndOffsets.setIndexed(true);
ftPositionsAndOffsets.setTokenized(true);
ftPositionsAndOffsets.setStoreTermVectors(true);
ftPositionsAndOffsets.setStoreTermVectorPositions(true);
ftPositionsAndOffsets.setStoreTermVectorOffsets(true);
tvf = new Field("tvPositionsAndOffsets", "bobo bobo lucene lucene lucene test",
ftPositionsAndOffsets);
d1.add(tvf);
Document d2 = new Document();