# SearchDocument

> Create a new SearchDocument.

## Definition

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

## SearchDocument(string, string, string, int)

Create a new SearchDocument.

```csharp
public SearchDocument(string id, string name = null, string source = null, int score = 2147483647)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Document unique ID in the search index.**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Document name (for example, asset path or transform path) if any.**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Document contained source path or ID. This is usually defined for nested objects with a prefab or a scene.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Document score used for sorting.

## SearchDocument(SearchDocument, int)

Create a new SearchDocument.

```csharp
public SearchDocument(SearchDocument doc, int score)
```

### Parameters

**** (\[SearchDocument]\(/engine/6000.6/script-reference/unityeditor/search/searchdocument)): Source document to copy properties from.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Document score used for sorting.

## SearchDocument(SearchDocument, string)

Create a new SearchDocument.

```csharp
public SearchDocument(SearchDocument doc, string path)
```

### Parameters

**** (\[SearchDocument]\(/engine/6000.6/script-reference/unityeditor/search/searchdocument)): Source document to copy properties from.**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Document path (i.e. asset path or transform path) if any.
