Skip to main content

Documentation Index

Fetch the complete documentation index at: https://algolia.com/llms.txt

Use this file to discover all available pages before exploring further.

The tagFilters parameter lets you filter records based on values in the _tags attribute. It uses the same syntax and structure as facetFilters. Unlike regular facets, _tags is always available for filtering—you don’t need to include it in attributesForFaceting. To use this parameter, your records must contain a top-level _tags attribute. This parameter is only for filtering—it doesn’t return facet counts or support faceting behavior.
For advanced use cases or filters on arbitrary attributes, use the filters parameter instead.

Usage notes

  • Tag names are case-sensitive.
  • Multiple tags in an array are combined with AND.
    Use nested arrays for OR conditions.
  • Prefix a tag with - to exclude it.
    Example: ["tag1", "-tag2"] means tag1 AND NOT tag2.
For more information, see facetFilters.

Example

Current API clients

var response = await client.SearchSingleIndexAsync<Hit>(
  "INDEX_NAME",
  new SearchParams(
    new SearchParamsObject
    {
      Query = "query",
      TagFilters = new TagFilters(
        new List<TagFilters>
        {
          new TagFilters("SciFi"),
          new TagFilters(
            new List<TagFilters> { new TagFilters("Book"), new TagFilters("Movie") }
          ),
        }
      ),
    }
  )
);
index.Search(new Query("query")
{
  TagFilters = new List>
  {
    new List { "Book", "Movie" },
    new List { "SciFi" }
  }
});
Last modified on March 23, 2026