Skip to content

Commit

Permalink
Update redis index calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
denis256 committed Jan 6, 2023
1 parent 4b52a71 commit 47da8e9
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -159,12 +159,11 @@ public BasicPolyList insert(String poly, Collection<InsertRequest> insertRequest
BasicPoly tagIndex = index(poly).orElseGet(() -> BasicPoly.newPoly(TAG_INDEX_KEY));

// update tags list
Map data = new HashMap();
BasicPoly data = new BasicPoly();
if (indexData != null) {
data = indexData.getOrDefault(indexName, BasicPoly.newPoly(indexName)).data();
data.data().putAll(indexData.getOrDefault(indexName, BasicPoly.newPoly(indexName)).data());
}

data.put("_count", jedis.llen(indexId));
data.put("count", jedis.llen(indexId));
tagIndex.put(indexName, data);
writePoly(jedis, poly, tagIndex);
}
Expand Down

0 comments on commit 47da8e9

Please sign in to comment.