# SearchFlags

> Search options used to fetch items. Mostly with SearchContext to specify how a search should be handled.

## Definition

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

```csharp
[Flags]
public enum SearchFlags
```

## Examples

```csharp
using System.Collections.Generic;
using UnityEditor;
using UnityEditor.Search;
using UnityEngine;

public class SearchFlags_NoIndexing
{
    [MenuItem("Examples/SearchFlags/NoIndexing")]
    public static void RequestAll()
    {
        // Find all assets matching the word Search without using any indexed data (will rely on the Find Files provider).
        SearchService.Request("p: Search", (SearchContext context, IList<SearchItem> items) =>
        {
            foreach (var item in items)
                Debug.Log(item);
        }, SearchFlags.NoIndexing);
    }
}
```

## Fields

| Value                                                                                                            | Description                                                                                                                                                                                                                                    |
| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [AllProvidersAvailable](/engine/6000.7/script-reference/unityeditor/search/searchflags/allprovidersavailable.md) | All SearchProviders are available in the SearchWindow dropdown menu.                                                                                                                                                                           |
| [Debug](/engine/6000.7/script-reference/unityeditor/search/searchflags/debug.md)                                 | Adds debugging information to [SearchItem](/engine/6000.7/script-reference/unityeditor/search/searchitem.md) while looking for results.                                                                                                        |
| [Default](/engine/6000.7/script-reference/unityeditor/search/searchflags/default.md)                             | Default Search Flag ([SearchFlags.Sorted](/engine/6000.7/script-reference/unityeditor/search/searchflags/sorted.md)).                                                                                                                          |
| [Dockable](/engine/6000.7/script-reference/unityeditor/search/searchflags/dockable.md)                           | Indicates that the search view is dockable. This flag is only usable with internal API.                                                                                                                                                        |
| [Expression](/engine/6000.7/script-reference/unityeditor/search/searchflags/expression.md)                       | Indicates that the search query will be evaluated as a search expression.                                                                                                                                                                      |
| [FocusContext](/engine/6000.7/script-reference/unityeditor/search/searchflags/focuscontext.md)                   | Indicates that the search view will focus on the first contextual search provider available when it opens. This flag is only usable with internal API.                                                                                         |
| [GeneralSearchWindow](/engine/6000.7/script-reference/unityeditor/search/searchflags/generalsearchwindow.md)     | This is a general purpose search window that has access to all Providers in the SearchService.                                                                                                                                                 |
| [HidePanels](/engine/6000.7/script-reference/unityeditor/search/searchflags/hidepanels.md)                       | Indicates that the search view will hide its side panels when it opens. This flag is only usable with internal API.                                                                                                                            |
| [Multiselect](/engine/6000.7/script-reference/unityeditor/search/searchflags/multiselect.md)                     | Indicates that the search view will allow multi-selection. This flag is only usable with internal API.                                                                                                                                         |
| [NoIndexing](/engine/6000.7/script-reference/unityeditor/search/searchflags/noindexing.md)                       | Prevents the search from using indexing. Asset Provider will use its builtin Find in Files provider.                                                                                                                                           |
| [None](/engine/6000.7/script-reference/unityeditor/search/searchflags/none.md)                                   | No specific search options. Result will be unsorted.                                                                                                                                                                                           |
| [OpenContextual](/engine/6000.7/script-reference/unityeditor/search/searchflags/opencontextual.md)               | Opens a search view with default contextual options. This flag is only usable with internal API.                                                                                                                                               |
| [OpenDefault](/engine/6000.7/script-reference/unityeditor/search/searchflags/opendefault.md)                     | Opens a search view with default options. This flag is only usable with internal API.                                                                                                                                                          |
| [OpenGlobal](/engine/6000.7/script-reference/unityeditor/search/searchflags/openglobal.md)                       | Opens a search view for a global search. This flag is only usable with internal API.                                                                                                                                                           |
| [OpenPicker](/engine/6000.7/script-reference/unityeditor/search/searchflags/openpicker.md)                       | Opens a search view as an object picker. This flag is only usable with internal API.                                                                                                                                                           |
| [Packages](/engine/6000.7/script-reference/unityeditor/search/searchflags/packages.md)                           | The Object Picker window will include any results from packages.                                                                                                                                                                               |
| [QueryString](/engine/6000.7/script-reference/unityeditor/search/searchflags/querystring.md)                     | Evaluate the search text as a pure query string (do not evaluate the text as a search expression).                                                                                                                                             |
| [ReuseExistingWindow](/engine/6000.7/script-reference/unityeditor/search/searchflags/reuseexistingwindow.md)     | Indicates that the search view will find any existing window instances that are already opened before creating a new one. This flag is only usable with internal API.                                                                          |
| [ShowErrorsWithResults](/engine/6000.7/script-reference/unityeditor/search/searchflags/showerrorswithresults.md) | Always show query errors even when there are results available. This flag is only usable with internal API.                                                                                                                                    |
| [Synchronous](/engine/6000.7/script-reference/unityeditor/search/searchflags/synchronous.md)                     | Search items are fetched synchronously. This can take a long time for some [SearchProvider](/engine/6000.7/script-reference/unityeditor/search/searchprovider.md) (like asset). Use at your own risk.                                          |
| [UseSessionSettings](/engine/6000.7/script-reference/unityeditor/search/searchflags/usesessionsettings.md)       | Persist the SearchContext state in between sessions using the SearchViewState.sessionName as its data key.                                                                                                                                     |
| [WantsMore](/engine/6000.7/script-reference/unityeditor/search/searchflags/wantsmore.md)                         | Sets the search to search for all results. This might take longer than unusual if [SearchProvider](/engine/6000.7/script-reference/unityeditor/search/searchprovider.md) are using multiple sources of items (files on disk, AssetDatabase...) |
