mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-09 22:45:04 +00:00
Highlighting: Using "plain" (non term vector) highlighting with custom score within a filtered query fails to highlight, closes #1894.
This commit is contained in:
parent
c56218a41f
commit
4a21ddf6f3
@ -27,6 +27,7 @@ import org.apache.lucene.document.Document;
|
||||
import org.apache.lucene.document.Field;
|
||||
import org.apache.lucene.document.Fieldable;
|
||||
import org.apache.lucene.search.ConstantScoreQuery;
|
||||
import org.apache.lucene.search.FilteredQuery;
|
||||
import org.apache.lucene.search.Query;
|
||||
import org.apache.lucene.search.highlight.*;
|
||||
import org.apache.lucene.search.highlight.Formatter;
|
||||
@ -142,6 +143,9 @@ public class HighlightPhase implements FetchSubPhase {
|
||||
query = q.getQuery();
|
||||
extracted = true;
|
||||
}
|
||||
} else if (query instanceof FilteredQuery) {
|
||||
query = ((FilteredQuery) query).getQuery();
|
||||
extracted = true;
|
||||
}
|
||||
if (!extracted) {
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user