expandContentFilter

Function

Prior to serialization into the query syntax for the backing APIs, we first expand Filters

Filter's can express their intent in a very terse form, but to ensure consistent structures we expand them into their more verbose form.

i.e. title: "Water" expands into title: { any: ["Water"]}

  • "well known" type values are expanded
    • i.e. type: "$storymap" expands into two subFilter entries
  • Fields defined as string | string[] | MatchOptions will be converted to a MatchOptions
  • RelativeDate fields are converted to DateRange

Parameters

Parameter Type Default Notes
filter Required Filter<"content">

Returns

Property Type Notes
access Optional IMatchOptions
created Optional IDateRange<number>
description Optional IMatchOptions
group Optional IMatchOptions
id Optional IMatchOptions
modified Optional IDateRange<number>
orgid Optional IMatchOptions
owner Optional IMatchOptions
subFilters Optional IContentFilter[]
tags Optional IMatchOptions
term Optional string
title Optional IMatchOptions
type Optional IMatchOptions
typekeywords Optional IMatchOptions

Function defined in common/src/search/content-utils.ts:267