This content has been marked as final. Show 2 replies
The HIGHLIGHT function is quite expensive, as each time you call it, the whole document has to be passed through the complete indexing pipeline. This makes it unsuitable for repeated calling in a loop as you seem to be doing.
Native compilation is not likely to have a noticable effect, unfortunately.
But that seems to be the only way to get the number of tokens matched in a string.
Is there any other way around?