f.add( "docFreq", t.text()==null ? 0 : reader.docFreq( t ) ); // this can be 0 for non-indexed fields
// If we have a term vector, return that
if( fieldable.isTermVectorStored() ) {
try {
TermFreqVector v = reader.getTermFreqVector( docId, fieldable.name() );
if( v != null ) {
SimpleOrderedMap<Integer> tfv = new SimpleOrderedMap<Integer>();
for( int i=0; i<v.size(); i++ ) {
tfv.add( v.getTerms()[i], v.getTermFrequencies()[i] );
}
f.add( "termVector", tfv );
}
}
catch( Exception ex ) {