lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tomás Fernández Löbbe (JIRA) <j...@apache.org>
Subject [jira] [Commented] (LUCENE-6149) Infix suggesters' highlighting, allTermsRequired options are hardwired and not configurable for non-contextual lookup
Date Fri, 02 Jan 2015 23:29:34 GMT

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

Tomás Fernández Löbbe commented on LUCENE-6149:
-----------------------------------------------

[~boonious], could you update the patch to a recent version of trunk? Also, could you add
javadocs to the newly added constructors?

> Infix suggesters' highlighting, allTermsRequired options are hardwired and not configurable
for non-contextual lookup
> ---------------------------------------------------------------------------------------------------------------------
>
>                 Key: LUCENE-6149
>                 URL: https://issues.apache.org/jira/browse/LUCENE-6149
>             Project: Lucene - Core
>          Issue Type: Improvement
>          Components: modules/other
>    Affects Versions: 4.9, 4.10.1, 4.10.2, 4.10.3
>            Reporter: Boon Low
>            Assignee: Tomás Fernández Löbbe
>            Priority: Minor
>              Labels: suggester
>             Fix For: 5.0, Trunk
>
>         Attachments: LUCENE-6149.patch
>
>
> Highlighting and allTermsRequired are hardwired in _AnalyzingInfixSuggester_ for non-contextual
lookup (via _Lookup_) see *true*, *true* below:
> {code:title=AnalyzingInfixSuggester.java (extends Lookup.java) }
> public List<LookupResult> lookup(CharSequence key, Set<BytesRef> contexts,
boolean onlyMorePopular, int num) throws IOException {
>     return lookup(key, contexts, num, true, true);
> }
> /** Lookup, without any context. */
> public List<LookupResult> lookup(CharSequence key, int num, boolean allTermsRequired,
boolean doHighlight) throws IOException {
>     return lookup(key, null, num, allTermsRequired, doHighlight);
>   }
> {code}
> {code:title=Lookup.java}
> public List<LookupResult> lookup(CharSequence key, boolean onlyMorePopular, int
num) throws IOException {
>     return lookup(key, null, onlyMorePopular, num);
> }
> {code}
> The above means the majority of the current infix suggester lookup always return highlighted
results with allTermsRequired in effect. There is no way to change this despite the options
and improvement of LUCENE-6050, made to incorporate Boolean lookup clauses (MUST/SHOULD).
This shortcoming has also been reported in SOLR-6648.
> The suggesters (AnalyzingInfixSuggester, BlendedInfixSuggester) should provide a proper
mechanism to set defaults for highlighting and "allTermsRequired", e.g. in constructors (and
in Solr factories, thus configurable via solrconfig.xml). 



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