I need to iterate over all documents in a Lucene index, and obtain the positions at which each term occurs in each document. As far as I am able to understand from the Lucen
Your code ran properly when i tried it.
Are you adding the FieldType
properly to the document?
I did this:
Field ff = new Field("name", "value", ft);
document.add(ff);
Did you set FieldType.setStoreTermVectorPositions(true) on your field type at index time? http://lucene.apache.org/core/5_5_0/core/org/apache/lucene/document/FieldType.html#setStoreTermVectorPositions(boolean)