Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
5.2.1
-
None
-
None
-
New
Description
I have a tokenizer which sets the payload attribute and which drives the highlighter. In Formatter.highlightTerm() I need to examine that payload on the token. However TokenGroup.addToken() doesn't currently set the payload on the token which is created and fed through to Formatter.highlightTerm() within the TokenGroup.
I would suggest, TokenGroup.addToken():
token.setPayload(payloadAtt.getPayload());
having of course registered the payload attribute during initialisation of TokenGroup with:
payloadAtt = tokenStream.addAttribute(PayloadAttribute.class);