Hello, I am trying to index a txt file and then retrieve it's terms offset positions. Unfortunately I can only get only one offset information per term, not all of it(if it occured more than once while indexing) Here are most important parts of the code:

FieldType used while indexing.

Java Code:
private FieldType getFieldType(){
        FieldType fieldType = new FieldType();


        return fieldType;
After succesfully creating index, I am using indexReader to read terms.
and iterate through all of them but I have no idea how to collect theirs offsets.

Java Code:
 Terms terms =  indexReader.getTermVector(0,"text");
 TermsEnum iterator  = terms.iterator();

 BytesRef byteRef = null;
 while((byteRef = iterator.next()) != null) {
        String term = byteRef.utf8ToString();
        //I retrieve term name but  byteRef  contains only field called offset, not the actual OffsetVector 
I would be grateful for any help!