lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael McCandless (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LUCENE-4820) Add optional payload to AnalyzingSuggester
Date Thu, 14 Mar 2013 23:18:12 GMT

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

Michael McCandless commented on LUCENE-4820:
--------------------------------------------

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

I agree packing surface form + payload into a single output is weirdish ... making it a separate
FST output would be nice, but then I dreaded the different generics (sometimes FST<Pair>
and other times FST<Triple> or FST<Pair<Pair>>).

{quote}
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).
{quote}

True!  Though, we could do the same thing w/ the current approach ... eg break out the payload
and let the app check it for accept / reject (somewhere there is a patch to expose accept
method in AnalyzingSuggester...).

{quote}
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.
{quote}

Yeah it could be.  Hmm, every arc would add a byte (mostly, sometimes more I guess if payload
is longish), but if the payloads can be shared well, then the overall FST could be smaller
...

I agree we should explore it!
                
> 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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message