@Override
    public Mono<List<Tag>> findTags(String collectionName) {
        String namespace = getNamespace(collectionName);
        BsonDocument filter = new BsonDocument("ns", new BsonString(namespace));
        Publisher<Document> source = context.getConfigDatabase()
                .getCollection("tags")
                .find(filter);
        return Flux.from(source)
                .map(document -> {
                    try {
                        return new Tag(
                                document.getString("ns"),
                                document.getString("tag"),
                                document.get("max", Document.class),
                                document.get("min", Document.class));
                    } catch (Exception e) {
                        throw new CorruptedDocumentException(
                                "Failed to decode a tag from the document: "
                                        + document,
                                e);
                    }
                })
                .collectList();
    }
apply the shard key to the filter so that mongos know to which MongoDB the command needs to
be sent for better performance
turms-server-common/src/main/java/im/turms/server/common/storage/mongo/operation/TurmsMongoOperations.java