[ 
https://issues.apache.org/jira/browse/LUCENE-4820?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13602832#comment-13602832
 ] 

Robert Muir commented on LUCENE-4820:
-------------------------------------

Wouldn't it be better if the payload was an additional FST output (e.g. in the 
case its an ID or something).

Its wierd its tacked onto the surface form with INFORMATION_SEPARATOR.

I havent fully thought about the benefits, but i guess an ID value as a 
separate output could be used for
other things, like participating in the top-N comparator to simplify the 
tie-break logic (which if i recall,
is super-hairy for this suggester).

It might also be more efficient as a separate output, but I havent thought 
about all the cases there either.
its like if payloads dont exist we could just use the empty string or whatever 
and there is really not much
added cost.
                
> Add optional payload to AnalyzingSuggester
> ------------------------------------------
>
>                 Key: LUCENE-4820
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4820
>             Project: Lucene - Core
>          Issue Type: Improvement
>          Components: modules/spellchecker
>            Reporter: Michael McCandless
>            Assignee: Michael McCandless
>             Fix For: 5.0, 4.3
>
>         Attachments: LUCENE-4820.patch, LUCENE-4820.patch
>
>
> It's useful to be able to store custom data (eg maybe a primary key or
> a URL or something) with each suggestion, so that the UI can do things
> like render an image along with each suggestion, or direct to a
> specific URL if the user clicks that suggestion, etc.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to