# CompareTo(SearchDocument)

> Compare this document against another document.

## Definition

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

```csharp
public int CompareTo(SearchDocument other)
```

### Parameters

**** (\[SearchDocument]\(/engine/6000.7/script-reference/unityeditor/search/searchdocument)): Another document to compare to.

### Returns

| Type                                                       | Description                      |
| ---------------------------------------------------------- | -------------------------------- |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) | If 0, both documents are equals. |
