private static PostingsEnum termDocs ( IndexReader reader , Term term ) throws IOException { return MultiFields . getTermDocsEnum ( reader , MultiFields . getLiveDocs ( reader ) , term . field ( ) , term . bytes ( ) ) ; }
NB : this is a convenient but very slow way of getting termDocs . It is sufficient for testing purposes .