My route tag filters not giving correct results

My route file looks like :

    permalink: /en/{slug}/
    template: index
    filter: 'tag:-in'
    permalink: /en/{slug}/
    template: en
    filter: 'tag:en'
    permalink: /in/{slug}/
    template: in
    filter: 'tag:in'

My use-case was like

  1. should show article in english
  2. should show article in hindi
  3. should show article in english
    But for my surprise, the 3rd case is showing no result.

Collections are a cascade - they are processed in order and each post can only belong to one collection.
So your first rule grabs all posts which don’t have the “in” tag, which I assume included all the ones with the “en” tag and then there are no posts left for the second collection.

You’re probably looking for channels instead of collections for at least one of these rules: