mirror of https://github.com/apache/lucene.git
LUCENE-2064: Highlighter support all MultiTermQuery subclasses without explicit casts - previous commit did not contain final patch due to JIRA AM / PM issue
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@836176 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c2cc1eaee7
commit
5e5e5aa85a
|
@ -567,31 +567,14 @@ public class WeightedSpanTermExtractor {
|
|||
}
|
||||
|
||||
@Override
|
||||
public TermEnum terms(Term t) throws IOException {
|
||||
field = t.field();
|
||||
return new TermEnum() {
|
||||
|
||||
@Override
|
||||
public Term term() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean next() throws IOException {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int docFreq() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void close() throws IOException {
|
||||
}
|
||||
};
|
||||
public TermEnum terms(final Term t) throws IOException {
|
||||
// only set first fieldname, maybe use a Set?
|
||||
if (t != null && field == null)
|
||||
field = t.field();
|
||||
return super.terms(t);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue