Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


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

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.
Warning
Deprecated. IndexWord with variations and exact match is no longer supported. Variations are handled internally. Exact match is handled when filtering. Use IndexWord(int documentIndex, string word, int scoreModifier) instead.
public void IndexWord(int documentIndex, in string word, int maxVariations, bool exact, int scoreModifier = 0)

Parameters

documentIndex

Document where the indexed word was found.

word

Word to add to the index.

maxVariations

Maximum number of variations to compute. Cannot be higher than the length of the word.

exact

If true, the indexer will also store an exact match entry for this word.

scoreModifier

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.
Warning
Deprecated. IndexWord with exact match is no longer supported. Exact match is handled when filtering. Use IndexWord(int documentIndex, string word, int scoreModifier) instead.
public void IndexWord(int documentIndex, in string word, bool exact = false, int scoreModifier = 0)

Parameters

documentIndex

Document where the indexed word was found.

word

Word to add to the index.

exact

If true, we will also store an exact match entry for this word.

scoreModifier

Modifier to apply to the base match score for a specific word.

Remarks

The following example indexes a word that can be used to search indexed prefabs with
myawesomeword
,
myawe
, etc.

IndexWord(int, string)

Adds a new word coming from a specific document to the index.
public void IndexWord(int documentIndex, string word)

Parameters

documentIndex

Document where the indexed word was found.

word

Word to add to the index.

Remarks

The following example indexes a word that can be used to search indexed prefabs with
myawesomeword
,
myawe
, etc.

Examples

[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

documentIndex

Document where the indexed word was found.

word

Word to add to the index.

scoreModifier

Modifier to apply to the base match score for a specific word.

Remarks

The following example indexes a word that can be used to search indexed prefabs with
myawesomeword
,
myawe
, etc.

Examples

[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);}