Redisearch FT.INFO result decoder throws NumberFormatException

Signed-off-by: Alexander Tumin <iamtakingiteasy@eientei.org>
pull/6090/head
Alexander Tumin 7 months ago
parent 66c4262d60
commit 24bf912d7b

@ -39,13 +39,13 @@ public class IndexInfo {
private Map<String, Object> dialectStats; private Map<String, Object> dialectStats;
private Long docs; private Double docs;
private Long maxDocId; private Double maxDocId;
private Long terms; private Double terms;
private Long records; private Double records;
private Double invertedSize; private Double invertedSize;
@ -141,38 +141,38 @@ public class IndexInfo {
return this; return this;
} }
public Long getDocs() { public Double getDocs() {
return docs; return docs;
} }
public IndexInfo setDocs(Long docs) { public IndexInfo setDocs(Double docs) {
this.docs = docs; this.docs = docs;
return this; return this;
} }
public Long getMaxDocId() { public Double getMaxDocId() {
return maxDocId; return maxDocId;
} }
public IndexInfo setMaxDocId(Long maxDocId) { public IndexInfo setMaxDocId(Double maxDocId) {
this.maxDocId = maxDocId; this.maxDocId = maxDocId;
return this; return this;
} }
public Long getTerms() { public Double getTerms() {
return terms; return terms;
} }
public IndexInfo setTerms(Long terms) { public IndexInfo setTerms(Double terms) {
this.terms = terms; this.terms = terms;
return this; return this;
} }
public Long getRecords() { public Double getRecords() {
return records; return records;
} }
public IndexInfo setRecords(Long records) { public IndexInfo setRecords(Double records) {
this.records = records; this.records = records;
return this; return this;
} }

@ -46,10 +46,10 @@ public class IndexInfoDecoder implements MultiDecoder<Object> {
ii.setOptions((Map<String, Object>) result.get("index_options")); ii.setOptions((Map<String, Object>) result.get("index_options"));
ii.setDefinition((Map<String, Object>) result.get("index_definition")); ii.setDefinition((Map<String, Object>) result.get("index_definition"));
ii.setAttributes((List<Map<String, Object>>) result.get("attributes")); ii.setAttributes((List<Map<String, Object>>) result.get("attributes"));
ii.setDocs(toLong(result, "num_docs")); ii.setDocs(toDouble(result, "num_docs"));
ii.setMaxDocId(toLong(result, "max_doc_id")); ii.setMaxDocId(toDouble(result, "max_doc_id"));
ii.setTerms(toLong(result, "num_terms")); ii.setTerms(toDouble(result, "num_terms"));
ii.setRecords(toLong(result, "num_records")); ii.setRecords(toDouble(result, "num_records"));
ii.setInvertedSize(toDouble(result, "inverted_sz_mb")); ii.setInvertedSize(toDouble(result, "inverted_sz_mb"));
ii.setVectorIndexSize(toDouble(result, "vector_index_sz_mb")); ii.setVectorIndexSize(toDouble(result, "vector_index_sz_mb"));
ii.setTotalInvertedIndexBlocks(toDouble(result, "total_inverted_index_blocks")); ii.setTotalInvertedIndexBlocks(toDouble(result, "total_inverted_index_blocks"));

Loading…
Cancel
Save