lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "robert.onslow (JIRA)" <j...@apache.org>
Subject [jira] [Created] (LUCENE-6605) Set payloads in token within TokenGroup in Highlighter
Date Thu, 25 Jun 2015 08:35:05 GMT
robert.onslow created LUCENE-6605:
-------------------------------------

             Summary: Set payloads in token within TokenGroup in Highlighter
                 Key: LUCENE-6605
                 URL: https://issues.apache.org/jira/browse/LUCENE-6605
             Project: Lucene - Core
          Issue Type: Improvement
    Affects Versions: 5.2.1
            Reporter: robert.onslow


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






--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message