Both primaryText
and secondaryText
are used for user query matching.
primaryText
has high-priority. secondaryText
has lower-priority.
...
const indexer = pluginContext.indexer;
function startup() {
const indexerElement = {
id: 'unique_value',
primaryText: 'Hello, World',
secondaryText: 'This is hello world description'
};
indexer.set('any-key', [indexerElement]);
}
...