List of usage examples for org.apache.lucene.index SegmentInfos getId
public byte[] getId()
From source file:org.elasticsearch.index.engine.CommitStats.java
License:Apache License
public CommitStats(SegmentInfos segmentInfos) { // clone the map to protect against concurrent changes userData = MapBuilder.<String, String>newMapBuilder().putAll(segmentInfos.getUserData()).immutableMap(); // lucene calls the current generation, last generation. generation = segmentInfos.getLastGeneration(); if (segmentInfos.getId() != null) { // id is only written starting with Lucene 5.0 id = Base64.encodeBytes(segmentInfos.getId()); }/* ww w . jav a 2 s .c o m*/ numDocs = Lucene.getNumDocs(segmentInfos); }