{
  "from": @offset@,
  @limit@
  "track_scores": true,
  "sort": [
    {
      "@sort_field@": {
        "order": "@sort_direction@"
      }
    }
  ],
  "_source": [
    "name",
    "workspace",
    "path"
  ],
  "query": {
    "bool": {
      @term_query@
      "filter": [
        @category_query@
        @favorite_query@
        {
          "bool": {
            "must": [
              {
                "bool": {
                  "should": [
                    @permissions@
                  ]
                }
              },
              @fileTypes_query@
              @size_query@
              @date_query@
              {
                "bool": {
                  "should": {
                    "bool": {
                      "must_not": {
                        "exists": {
                          "field": "sites"
                        }
                      }
                    }
                  }
                }
              },
              {
                "bool": {
                  "should": [
                  ]
                }
              },
              {
                "bool": {
                  "should": [
                    {
                      "term": {
                        "workspace": "@workspace@"
                      }
                    }
                  ]
                }
              },
              {
                "bool": {
                  "should": [
                    {
                      "prefix": {
                        "path": {
                          "value": "@path@"
                        }
                      }
                    }
                  ]
                }
              }
            ]
          }
        }
      ]
    }
  },
  @size_agg@
  "highlight": {
    "pre_tags": [
      "<span class='searchMatchExcerpt'>"
    ],
    "post_tags": [
      "</span>"
    ],
    "fields": {
      "title": {
        "type": "unified",
        "fragment_size": 100,
        "no_match_size": 0,
        "number_of_fragments": 3
      }
    }
  }
}