When you are adding fields to documents in creating the lucene index, you have to add the content mentioned in red. You have to rebuilt the lucene index.
d.add(new Field("fieldName", fieldContent, Field.Store.YES,
Field.Index.ANALYZED,Field.TermVector.WITH_POSITIONS))
