Skip to content

Commit

Permalink
Delete stored fields from index stats (#1219)
Browse files Browse the repository at this point in the history
  • Loading branch information
PepijnBoers committed May 23, 2020
1 parent b541d1e commit b6e0367
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/main/java/io/anserini/index/IndexReaderUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@
import org.apache.lucene.analysis.Analyzer;
import org.apache.lucene.document.Document;
import org.apache.lucene.index.DirectoryReader;
import org.apache.lucene.index.FieldInfo;
import org.apache.lucene.index.FieldInfos;
import org.apache.lucene.index.IndexReader;
import org.apache.lucene.index.MultiTerms;
import org.apache.lucene.index.PostingsEnum;
Expand Down Expand Up @@ -787,12 +785,6 @@ public static Map<String, Object> getIndexStats(IndexReader reader) throws IOExc
indexStats.put("non_empty_documents", reader.getDocCount(IndexArgs.CONTENTS));
indexStats.put("unique_terms", terms.size());
indexStats.put("total_terms", reader.getSumTotalTermFreq(IndexArgs.CONTENTS));

FieldInfos fieldInfos = FieldInfos.getMergedFieldInfos(reader);
for (FieldInfo fi : fieldInfos) {
indexStats.put(fi.name, "indexOption: " + fi.getIndexOptions() +
", hasVectors: " + fi.hasVectors());
}
} catch (IOException e) {
// Eat any exceptions and just return null.
return null;
Expand Down

0 comments on commit b6e0367

Please sign in to comment.