We have an articles index. One of the article properties is "tags" that has an array of numbers as value, something like [131, 111, 113]. So I need to make a query where I can find articles related to another article by its tags values. This query should also consider which article has more matching tags. So if an article has two tags that match but there's another article with 3 matching tags then that one should be included in the response. I've been looking at "more like this" https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-mlt-query.html
But that one seems to be based on text only.
I think significant terms agg will help here. It uses feature selection to suggest docs. In this case , sigterms on "tags" field would give you most significant tags.