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-4518) Suggesters: highlighting (explicit markup of user-typed portions vs. generated portions in a suggestion)
Date Wed, 31 Oct 2012 17:11:13 GMT

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

Michael McCandless commented on LUCENE-4518:
--------------------------------------------

It'd be quite easy to back trace on each topN path to get the point at
which it "started" (= the end of where we matched based on the user's
input).

The challenge is ... that's the analyzed form, not the surface form;
in general we need the reverse mapping from analyzed form offsets back
to surface form offsets ... and the OffsetAttribute gives us that, but
unfortunately only gives us start/end of each token.

Another challenge is we convert the analyzed form into a graph
(TokenStreamToAutomaton), so we'd somehow need to get the surface
form offsets through there too.

                
> Suggesters: highlighting (explicit markup of user-typed portions vs. generated portions
in a suggestion)
> --------------------------------------------------------------------------------------------------------
>
>                 Key: LUCENE-4518
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4518
>             Project: Lucene - Core
>          Issue Type: New Feature
>            Reporter: Oliver Christ
>
> As a user, I would like the lookup result of the suggestion engine to contain information
which allows me to distinguish the user-entered portion from the autocompleted portion of
a suggestion. That information can then be used for e.g. highlighting. 
> *Notes:*
> It's trivial if the suggestion engine only applies simple prefix search, as then the
user-typed prefix is always a true prefix of the completion. However, it's non-trivial as
soon as you use an AnalyzingSuggester, where the completion may (in extreme cases) be quite
different from the user-provided input. As soon as case/diacritics folding, script adaptation
(kanji/hiragana) come into play, the completion is no longer guaranteed to be an extension
of the query. Since the caller of the suggestion engine (UI) generally does not know the implementation
details, the required information needs to be passed in the LookupResult.
> *Discussion on java-user:*
> > I haven't found a simple solution for the highlighting yet,
> > particularly when using AnalyzingSuggester (where it's non-trivial).
> Mike McCandless:
> Ahh I see ... it is challenging in that case.  Hmm.  Maybe open an issue for this as
well, so we can discuss/iterate?

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