# IndexDocument(string, bool)

> Function to override in a concrete SearchIndexer to index the content of a document.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor.Search](/engine/6000.7/script-reference/unityeditor/search.md)
* **Assembly:** UnityEditor

```csharp
public virtual void IndexDocument(string document, bool checkIfDocumentExists)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Path of the document to index.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): Verifies if the document exists.
