[ https://issues.apache.org/jira/browse/LUCENE-3332?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13069565#comment-13069565 ]
Olivier Favre commented on LUCENE-3332: --------------------------------------- The advantage of the generating multiple PhraseQuerys, is that highlighting outputs a single highlighted fragment, instead of multiple highlighted words, one next to the other. I think looking at WeightedSpanTermExtractor's handling of MultiPhraseQuery may help, but considering the job of FieldQuery.expand(), it may need deep modifications. The cons of generating the combination is that it generates lots of other PhraseQuerys (bad complexity class), and that they will all be processed by expand() which itself is O(n^2). If each term is doubled in the source MultiTermQuery (say once stemmed, once intact), for a query having 5 words we will end up with n=32 generated PhraseQuerys, thus making 1024 comparison inside expand(). Fortunately, this process can be done only a single time per query, no need to do it all over again for each field or for each doc. > FastVectorHighlighter ignores MultiPhraseQuery (and more) > --------------------------------------------------------- > > Key: LUCENE-3332 > URL: https://issues.apache.org/jira/browse/LUCENE-3332 > Project: Lucene - Java > Issue Type: Bug > Components: modules/highlighter > Affects Versions: 3.3, 4.0 > Environment: Tested against Lucene trunk revision 1149488 (4.0), but > seen under Lucene 3.3 (tested through ElasticSearch 0.17.1, but the code is > clear: this version, and surely other prior (3.1-3.2) are impacted) > Reporter: Olivier Favre > Priority: Minor > Labels: highlighting > Attachments: TestMultiPhraseQueryHighlighting.java, > UsingCombinationAndFallback.patch, UsingFallback.patch > > Original Estimate: 3h > Remaining Estimate: 3h > > Similar to LUCENE-495. > Create a MultiPhraseQuery, use FastVectorHighlighter, you'll have no fragment. > Using PhraseQuery and/or Highlighter works, but not the previous combination. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org