Library/PackageCache/com.unity.quicksearch@1.6.0-preview.8/Editor/Indexing/ObjectIndexer.cs
/// <summary>
/// Run a search query in the index.
/// </summary>
/// <param name="searchQuery">Search query to look out for. If if matches any of the indexed variations a result will be returned.</param>
/// <param name="maxScore">Maximum score of any matched Search Result. See <see cref="SearchResult.score"/>.</param>
/// <param name="patternMatchLimit">Maximum number of matched Search Result that can be returned. See <see cref="SearchResult"/>.</param>
/// <returns>Returns a collection of Search Result matching the query.</returns>
Run a search query in the index.
Run a search query in the index .
public override IEnumerable<SearchResult> Search(string searchQuery, int maxScore = int.MaxValue, int patternMatchLimit = 2999)
        {
            if (settings.options.disabled)
                return Enumerable.Empty<SearchResult>();
            var query = BuildQuery(searchQuery, maxScore, patternMatchLimit);
            if (!query.valid)
                return Enumerable.Empty<SearchResult>();
            #if DEBUG_INDEXING
            using (new DebugTimer($"Search \"{searchQuery}\" in {name}"))
            #endif
            {
                return query.Apply(null).OrderBy(e => e.score).Distinct();
            }
        }
public override IEnumerable < SearchResult > Search ( string searchQuery , int maxScore = int . MaxValue , int patternMatchLimit = 2999 ) { if ( settings . options . disabled ) return Enumerable . Empty < SearchResult > ( ) ; var query = BuildQuery ( searchQuery , maxScore , patternMatchLimit ) ; if ( ! query . valid ) return Enumerable . Empty < SearchResult > ( ) ; if DEBUG_INDEXING using ( new DebugTimer ( $" Search  \" { searchQuery } \"  in  { name } " ) ) endif { return query . Apply ( null ) . OrderBy ( e => e . score ) . Distinct ( ) ; } }
Run a search query in the index.
Run a search query in the index .
Returns a collection of Search Result matching the query.
Returns a collection of Search Result matching the query .
searchQuery
string
Search query to look out for. If if matches any of the indexed variations a result will be returned.
Search query to look out for . If if matches any of the indexed variations a result will be returned .
maxScore
int
Maximum score of any matched Search Result. See .
Maximum score of any matched Search Result . See .
patternMatchLimit
int
Maximum number of matched Search Result that can be returned. See .
Maximum number of matched Search Result that can be returned . See .