Library/PackageCache/com.unity.quicksearch@1.6.0-preview.8/Editor/Indexing/ObjectIndexer.cs
/// <summary>
/// Add a property value to the index. A property is specified with a key and a string value. The value will be stored with multiple variations. See <see cref="SearchIndexer.AddProperty"/>.
/// </summary>
/// <param name="id">Debug information</param>
/// <param name="name">Key used to retrieve the value. See <see cref="SearchIndexer.AddProperty"/></param>
/// <param name="value">Value to add to the index.</param>
/// <param name="documentIndex">Document where the indexed word was found.</param>
/// <param name="saveKeyword">Define if we store this key in the keyword registry of the index. See <see cref="SearchIndexer.GetKeywords"/>.</param>
/// <param name="exact">If exact is true, only the exact match of the value will be stored in the index (not the variations).</param>
Add a property value to the index. A property is specified with a key and a string value. The value will be stored with multiple variations. See .
Add a property value to the index . A property is specified with a key and a string value . The value will be stored with multiple variations . See .
public void IndexProperty(string id, string name, string value, int documentIndex, bool saveKeyword, bool exact = false)
        {
            if (String.IsNullOrEmpty(value))
                return;
            IndexDebugMatch(id, name, value);
            var valueLower = value.ToLowerInvariant();
            if (exact)
            {
                AddProperty(name, valueLower, valueLower.Length, valueLower.Length, settings.baseScore, documentIndex, saveKeyword: saveKeyword, exact: true);
            }
            else
                AddProperty(name, valueLower, settings.baseScore, documentIndex, saveKeyword: saveKeyword);
        }
public void IndexProperty ( string id , string name , string value , int documentIndex , bool saveKeyword , bool exact = false ) { if ( String . IsNullOrEmpty ( value ) ) return ; IndexDebugMatch ( id , name , value ) ; var valueLower = value . ToLowerInvariant ( ) ; if ( exact ) { AddProperty ( name , valueLower , valueLower . Length , valueLower . Length , settings . baseScore , documentIndex , saveKeyword : saveKeyword , exact : true ) ; } else AddProperty ( name , valueLower , settings . baseScore , documentIndex , saveKeyword : saveKeyword ) ; }
Add a property value to the index.
Add a property value to the index .
id
string
None
name
string
Key used to retrieve the value. See
Key used to retrieve the value . See
value
string
Value to add to the index.
Value to add to the index .
documentIndex
int
Document where the indexed word was found.
Document where the indexed word was found .
saveKeyword
bool
Define if we store this key in the keyword registry of the index. See .
Define if we store this key in the keyword registry of the index . See .
exact
bool
If exact is true, only the exact match of the value will be stored in the index (not the variations).
If exact is true only the exact match of the value will be stored in the index ( not the variations ) .