1 package org.apache.lucene.search; 2 3 18 19 import java.io.IOException ; 20 21 22 class NonMatchingScorer extends Scorer { 23 public NonMatchingScorer() { super(null); } 25 public int doc() { throw new UnsupportedOperationException (); } 26 27 public boolean next() throws IOException { return false; } 28 29 public float score() { throw new UnsupportedOperationException (); } 30 31 public boolean skipTo(int target) { return false; } 32 33 public Explanation explain(int doc) { 34 Explanation e = new Explanation(); 35 e.setDescription("No document matches."); 36 return e; 37 } 38 } 39 40 41 | Popular Tags |