> For the complete documentation index, see [llms.txt](https://icij.gitbook.io/datashare/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://icij.gitbook.io/datashare/usage/filter-documents.md).

# Filter documents

Filters are on the left of the search bar. You can contextualize, exclude, lock and reset them. Active filters are displayed in the search breadcrumb.

## Filters

Open '**Filters**' on the left of the search bar:

<figure><img src="https://2881303961-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LWCyd3pDXO_H4jk9DgG%2Fuploads%2Fgit-blob-c4ab04175523b1e8df320f143e09300af575961b%2FScreenshot%202025-06-07%20at%2015.15.42.png?alt=media" alt="Screenshot of Datashare&#x27;s page to search documents with the &#x27;Filters&#x27; button at the left of the search bar highlighted"><figcaption></figcaption></figure>

<figure><img src="https://2881303961-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LWCyd3pDXO_H4jk9DgG%2Fuploads%2Fgit-blob-24902a58064ce52766d4ab0d32bd44380af1c9c7%2FScreenshot%202025-06-07%20at%2015.16.45.png?alt=media" alt="Screenshot of Datashare&#x27;s page to search documents with the &#x27;Filters&#x27; panel open and highlighted on the left of the page and on the right of the menud"><figcaption></figcaption></figure>

**'Indexing dates'** arethe dates when the documents were added to Datashare.

**'Embedding levels'** regard embedded documents:

* The 'file on disk' is level zero
* If a document is attached to (or contained in) a file on disk, its embedding level is '1st'
* If a document is attached to (or contained in) a document itself contained in a file on disk, its embedding level is '2nd'
* And so on

## Filter by entities

If you asked Datashare to '**Find entities**' and the task was complete, you will see names of people, organizations, locations and e-mail adresses in the filters. These are the entities **automatically detected by Datashare:**

<figure><img src="https://2881303961-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LWCyd3pDXO_H4jk9DgG%2Fuploads%2Fgit-blob-ee50977b30c452705b3c6682bb6af9793d75073b%2FScreenshot%202025-06-07%20at%2015.39.17.png?alt=media" alt="Screenshot of the Filters&#x27; entities" width="335"><figcaption></figcaption></figure>

## Exclude filters

Tick the '**Exclude**' checkbox to select all items except those selected.

In the search breadcrumb, you see that the excluded filters are **strikethrough**:

<figure><img src="https://2881303961-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LWCyd3pDXO_H4jk9DgG%2Fuploads%2Fgit-blob-71346867fc825846fd45e35c2ed4c8e32d8ca740%2FScreenshot%202025-06-07%20at%2015.42.43.png?alt=media" alt="Screenshot of Datashare&#x27;s page to search documents with the &#x27;People&#x27; filter open with 2 names ticked and the Exclude button ticked and highlighted as well as the two names in the search breadcrumb that are also strikethrough"><figcaption></figcaption></figure>

## Lock filters

{% hint style="info" %}
Locked filters are new in Datashare **21.20.4**.
{% endhint %}

Locking a filter value keeps it active for future searches, until you unlock it yourself, even across projects or after clearing every other filter.&#x20;

<figure><img src="https://2881303961-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LWCyd3pDXO_H4jk9DgG%2Fuploads%2FPraW5eLVHrdN70TBjVoE%2Fimage.png?alt=media&amp;token=bdf7664e-9160-482f-a5ad-e014011da6d5" alt=""><figcaption></figcaption></figure>

A lock is:

* **Personal**: the fact that a value is locked is never shared with other members, and never travels with a shared link. Other members opening a search you share always see the filter value but never see the padlock icon.
* **Cross-project**: a locked value stays locked when you switch to a different project, even one where that value doesn't exist.

{% hint style="info" %}
Locking only works on filter **values**, never on the free-text search query itself.
{% endhint %}

{% hint style="warning" %}
Only the lock itself is personal, not the value it applies to. Even locked, a filter value remains included, exactly as applied on screen, in anything you export, save or download: a shared link, a saved search or a batch download.
{% endhint %}

<figure><img src="https://2881303961-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LWCyd3pDXO_H4jk9DgG%2Fuploads%2Fgit-blob-6abec818310bb8a83e106739a6cda524889e39df%2F14-screencast-lock-and-apply-locked-filters.gif?alt=media" alt="Screencast of locking the &#x27;French&#x27; language filter, starting a new search that no longer includes it, then clicking &#x27;Apply locked filters&#x27; to bring it back"><figcaption></figcaption></figure>

#### Lock a value from the Filters panel

Tick a filter value, then click its **padlock icon** to lock it:

<figure><img src="https://2881303961-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LWCyd3pDXO_H4jk9DgG%2Fuploads%2Fgit-blob-9b6512882b739b3533a291a2f6200f9ac04c4321%2F09-page-search-documents-lock-filter-value-hover.jpg?alt=media" alt="Screenshot of Datashare&#x27;s Languages filter with &#x27;French&#x27; ticked and its open padlock icon revealed on hover, before it is locked"><figcaption></figcaption></figure>

The padlock switches to its closed/filled state once the value is locked:

<figure><img src="https://2881303961-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LWCyd3pDXO_H4jk9DgG%2Fuploads%2Fgit-blob-b441c9da4c802e5150f7018481e26e4243bf0fd8%2F10-page-search-documents-locked-filter-value.jpg?alt=media" alt="Screenshot of Datashare&#x27;s Languages filter with &#x27;French&#x27; ticked and locked, its closed padlock icon shown, and the corresponding chip in the search breadcrumb also showing a padlock icon"><figcaption></figcaption></figure>

Unticking a locked value removes it **and** unlocks it at the same time. There is no way to keep a lock without keeping its value applied.

{% hint style="info" %}
A value you locked earlier can still show up as locked even if it later disappears from the results (a deleted tag, a re-indexed path, for instance).
{% endhint %}

#### Lock a chip from the search breadcrumb

Open '**Your search**' to see the search breadcrumb, then click a chip's **padlock icon** to lock or unlock it (see the '**French**' chip above, for instance).

Locking one side of a paired filter (for instance a content type marked '**Excluded**') never locks its opposite side. For instance, if you lock 'PDF', its paired category content type ('Document') won't be locked.

#### Apply your locked filters

A lock doesn't silently reapply itself to searches that don't already match it. For instance, right after you open a search link someone else shared with you, or when you open a saved search, or start a brand-new search. The search breadcrumb's '**Apply locked filters**' button becomes clickable whenever at least one locked value isn't reflected in your current search:

<figure><img src="https://2881303961-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LWCyd3pDXO_H4jk9DgG%2Fuploads%2Fgit-blob-c0650a5696dcee6994449eb34114e7c6bf801d21%2F11-page-search-documents-apply-locked-filters-enabled.jpg?alt=media" alt="Screenshot of Datashare&#x27;s breadcrumb footer with the &#x27;Apply locked filters&#x27; button enabled, since a locked French value isn&#x27;t part of the current search"><figcaption></figcaption></figure>

Click it to instantly apply every locked value to your current search (locks always win over a conflicting value). A confirmation message tells you whether it succeeded:

<figure><img src="https://2881303961-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LWCyd3pDXO_H4jk9DgG%2Fuploads%2Fgit-blob-0802a5527ccd98b34f4b4c678ff2d01387d5f195%2F12-page-search-documents-locked-filters-applied-toast.jpg?alt=media" alt="Screenshot of Datashare&#x27;s search documents page with the &#x27;Locked filters successfully applied&#x27; confirmation message shown at the top right"><figcaption></figcaption></figure>

{% hint style="info" %}
If you have at least one lock active, the search breadcrumb opens automatically after you run a new search, and whenever a locked value stops matching your current search, so you always see what's locked before you read your results.
{% endhint %}

#### Unlock every filter

To remove every lock at once, without touching the filter values currently applied, open the search breadcrumb and click '**Unlock filters**':

<figure><img src="https://2881303961-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LWCyd3pDXO_H4jk9DgG%2Fuploads%2Fgit-blob-691a18b6f5b707af1cf98ab0f08d371abc7280e2%2F13-page-search-documents-unlock-filters.jpg?alt=media" alt="Screenshot of Datashare&#x27;s Languages filter and search breadcrumb after clicking &#x27;Unlock filters&#x27;: French stays ticked and applied, but its padlock icon and the footer&#x27;s lock count are gone"><figcaption></figcaption></figure>

## Contextualize filters

In most filters, tick '**Contextualize'** to **update the number of documents indicated in the filters so they reflect the results**.

The filter will only count what you selected, it will reflect the results of your current selection:

<figure><img src="https://2881303961-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LWCyd3pDXO_H4jk9DgG%2Fuploads%2Fgit-blob-d39fd9b0d8dea1466bb9dfc7441c8380b6ca9901%2FScreenshot%202025-06-07%20at%2018.32.09.png?alt=media" alt="Screenshot of Datashare&#x27;s page to search documents with a filter open and the Contextualize button at the bottom of this filter highlighted"><figcaption></figcaption></figure>

<figure><img src="https://2881303961-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LWCyd3pDXO_H4jk9DgG%2Fuploads%2Fgit-blob-20c4567456e00c3442a6c4d9afe1bff6b1569b97%2FScreenshot%202025-06-07%20at%2018.32.29.png?alt=media" alt="Screenshot of Datashare&#x27;s page to search documents with the &#x27;Language&#x27; filter open, the &#x27;Contextualize&#x27; checkbox ticked and the whole filter highlighted"><figcaption></figcaption></figure>

## Clear all filters

To reset all filters at the same time, open the **search breadcrumb**:

<figure><img src="https://2881303961-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LWCyd3pDXO_H4jk9DgG%2Fuploads%2Fgit-blob-9b270a15b775209a93a4e4d640651450b95d456c%2FScreenshot%202025-06-07%20at%2018.29.17.png?alt=media" alt="Screenshot of Datashare&#x27;s page to search documents with the &#x27;Your search&#x27; button on the left of the search bar highlighted"><figcaption></figcaption></figure>

Click '**Clear filters**':

<figure><img src="https://2881303961-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LWCyd3pDXO_H4jk9DgG%2Fuploads%2Fgit-blob-194ae3aa8ed823992a24e0d0a0a81fe48861676f%2FScreenshot%202025-06-07%20at%2018.29.43.png?alt=media" alt="Screenshot of Datashare&#x27;s page to search documents with search breadcrumb open and the &#x27;Clear filter&#x27; button highlighted"><figcaption></figcaption></figure>

{% hint style="info" %}
'**Clear filters**' and '**Clear filters and query**' never remove a locked value. They clear every other filter and instantly re-apply your locks. To remove the locks themselves, see [Unlock every filter](#unlock-every-filter) above.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://icij.gitbook.io/datashare/usage/filter-documents.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
