[
https://issues.apache.org/jira/browse/LUCENE-4728?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13564743#comment-13564743
]
Robert Muir commented on LUCENE-4728:
-------------------------------------
In the case of these highlighters with huge instanceof's across all queries,
instead of doing things like:
{noformat}
+ } else if (sourceQuery instanceof CommonTermsQuery) {
+ flatten(sourceQuery.rewrite(reader), reader, flatQueries);
}
{noformat}
can't it just be something like:
{noformat}
+ } else if (!sourceQuery instanceof MultiTermQuery) {
+ // an unknown query type, see if it rewrites into something we know.
+ flatten(sourceQuery.rewrite(reader), reader, flatQueries);
}
{noformat}
then we wouldn't need explicit dependencies in these highlighters on *every
single query*
> Allow CommonTermsQuery to be highlighted
> ----------------------------------------
>
> Key: LUCENE-4728
> URL: https://issues.apache.org/jira/browse/LUCENE-4728
> Project: Lucene - Core
> Issue Type: Improvement
> Components: modules/highlighter
> Affects Versions: 4.1
> Reporter: Simon Willnauer
> Assignee: Simon Willnauer
> Fix For: 4.2, 5.0
>
> Attachments: LUCENE-4728.patch
>
>
> Add support for CommonTermsQuery to all highlighter impls.
> This might add a dependency (query-jar) to the highlighter so we might think
> about adding it to core?
--
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]