IndexWord
The word will be added with a maximum of variation. This can be used to save some space for very large words.
Read time 2 minutesLast updated 12 days ago
Definition
- Type: Method
- Namespace: UnityEditor.Search
- Assembly: UnityEditor
IndexWord(int, string, int, bool, int)
The word will be added with a maximum of variation. This can be used to save some space for very large words.
public void IndexWord(int documentIndex, in string word, int maxVariations, bool exact, int scoreModifier = 0)
Parameters
Document where the indexed word was found.
Word to add to the index.
Maximum number of variations to compute. Cannot be higher than the length of the word.
If true, the indexer will also store an exact match entry for this word.
Modifier to apply to the base match score for a specific word.
IndexWord(int, string, bool, int)
Adds a new word coming from a specific document to the index. The word will be added with multiple variations allowing partial search.
public void IndexWord(int documentIndex, in string word, bool exact = false, int scoreModifier = 0)
Parameters
Remarks
The following example indexes a word that can be used to search indexed prefabs with , , etc.
myawesomewordmyaweIndexWord(int, string)
Adds a new word coming from a specific document to the index.
public void IndexWord(int documentIndex, string word)
Parameters
Remarks
The following example indexes a word that can be used to search indexed prefabs with , , etc.
myawesomewordmyaweExamples
[CustomObjectIndexer(typeof(GameObject))]static void IndexGameObject(CustomObjectIndexerTarget target, ObjectIndexer indexer){ var go = target.target as GameObject; if (go == null) return; indexer.IndexWord(target.documentIndex, "myawesomeword", 0);}
IndexWord(int, string, int)
Adds a new word coming from a specific document to the index.
public void IndexWord(int documentIndex, string word, int scoreModifier)
Parameters
Remarks
The following example indexes a word that can be used to search indexed prefabs with , , etc.
myawesomewordmyaweExamples
[CustomObjectIndexer(typeof(GameObject))]static void IndexGameObject(CustomObjectIndexerTarget target, ObjectIndexer indexer){ var go = target.target as GameObject; if (go == null) return; indexer.IndexWord(target.documentIndex, "myawesomeword", 0);}