Using findBy() on a tags field wont work for me

I’m trying to find a page by using findBy on a tags field, but I get NULL.

$category = $site->index()->findBy('tag_category_tags', 'sovsäck'); // give me NULL

In the blueprint of the page I like to find I have this field:

  label: Taggar som styr vilka produkter kategorien ska innehålla
  type: tags
  separator: ;
  options: query
      fetch: site.find("tag-manager").global_tags.toStructure
      text: "{{ structureItem.tag }}"
      value: "{{ structureItem.tag }}"

I also tried

$category = $site->index()->findBy('tag_category_tags', 'sovsäck', ';');

But still NULL

You have to use filterBy() instead (if necessary in combination with first() to get a single element instead of a collection).

I have tried filterBy() also, but it gave me an empty collection.

Ah, now I got it right. I forgot about the ; the first time I tried filterBy().

$category = $site->index()->filterBy('tag_category_tags', 'sovsäck', ';')->first();