Error when using TSK_KEYWORD_HIT artifact type

Hi, I’m getting an error when I use TSK_KEYWORD_HIT artifact: “Error retrieving indexed text”. I would like to mark up the string which I find by regex.
It looks like this in Autopsy:

This is my piece of code:

Also there is a problem in postArtifact() in third parameter: “context is not defined”. When I don’t use this parameter, module runs but text is not marked up. This is in error log:

I don’t know how to handle this error. Could you help me please?