Adjust Lucene version value to be a String rather than an numeric. I found a case with Ruby where the numeric

was too big to laod when serialiized to a YAML file (maybe this is an edge case?).  It is unlikely that a client
needs to use this as a numeric anyway, but rather as a comparison against later calls to the IndexInfoRequestHandler.




git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@507825 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Erik Hatcher 2007-02-15 05:33:11 +00:00
parent c3d36ff179
commit ea7d510901
1 changed files with 2 additions and 2 deletions

View File

@ -58,10 +58,10 @@ public class IndexInfoRequestHandler extends RequestHandlerBase {
}
rsp.add("fields", fields);
Map<String,Number> indexInfo = new HashMap<String,Number>();
Map<String,Object> indexInfo = new HashMap<String,Object>();
indexInfo.put("numDocs", reader.numDocs());
indexInfo.put("maxDoc", reader.maxDoc());
indexInfo.put("version", reader.getVersion());
indexInfo.put("version", Long.toString(reader.getVersion()));
// indexInfo.put("age", ); // computed from SolrIndexSearcher.openedAt?
rsp.add("index", indexInfo);