Mongo Playground

Configuration

[{"id":1,"sig1":"12345","sig2":"67890",},{"id":2,"sig1":"67890","sig2":"ABCDE",}]

Query

db.collection.aggregate([{"$set":{"valSet":["$sig1","$sig2"]}},{"$unwind":"$valSet"},{"$group":{"_id":"$valSet","ids":{"$push":"$id"}}},{"$match":{"$expr":{"$gt":[{"$size":"$ids"},1]}}}])

Result