[
https://issues.apache.org/jira/browse/LUCENE-3440?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13112261#comment-13112261
]
Koji Sekiguchi commented on LUCENE-3440:
----------------------------------------
I think this is an interesting point of view, thanks! But I couldn't apply the
patch to the latest trunk:
{code}
[koji@MacBook LUCENE-3440]$ patch -p0 --dry-run < LUCENE-3440.patch
patching file
lucene/contrib/highlighter/src/java/org/apache/lucene/search/vectorhighlight/FieldFragList.java
patching file
lucene/contrib/highlighter/src/java/org/apache/lucene/search/vectorhighlight/FieldPhraseList.java
patching file
lucene/contrib/highlighter/src/java/org/apache/lucene/search/vectorhighlight/FieldTermStack.java
Hunk #1 FAILED at 31.
Hunk #2 FAILED at 96.
Hunk #3 FAILED at 108.
Hunk #4 succeeded at 148 (offset -9 lines).
3 out of 4 hunks FAILED -- saving rejects to file
lucene/contrib/highlighter/src/java/org/apache/lucene/search/vectorhighlight/FieldTermStack.java.rej
{code}
Can you verify that?
> FastVectorHighlighter: IDF-weighted terms for ordered fragments
> ----------------------------------------------------------------
>
> Key: LUCENE-3440
> URL: https://issues.apache.org/jira/browse/LUCENE-3440
> Project: Lucene - Java
> Issue Type: Improvement
> Components: modules/highlighter
> Affects Versions: 3.5
> Reporter: S.L.
> Priority: Minor
> Labels: patch
> Fix For: 3.5
>
> Attachments: LUCENE-3440-1.patch
>
>
> The FastVectorHighlighter uses for every term found in a fragment an equal
> weight, which causes a higher ranking for fragments with a high number of
> words or, in the worst case, a high number of very common words than
> fragments that contains *all* of the terms used in the original query.
> This patch provides ordered fragments with IDF-weighted terms:
> total weight = total weight + IDF for unique term per fragment * boost of
> query;
> The ranking-formula should be the same, or at least similar, to that one used
> in org.apache.lucene.search.highlight.QueryTermScorer.
> The patch is simple, but it works for us.
> Some ideas:
> - A better approach would be moving the whole fragments-scoring into a
> separate class.
> - Switch scoring via parameter
> - Exact phrases should be given a even better score, regardless if a
> phrase-query was executed or not
> - edismax/dismax-parameters pf, ps and pf^boost should be observed and
> corresponding fragments should be ranked higher
--
This message is automatically generated by JIRA.
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]