Examples of Explanation


Examples of org.apache.lucene.search.Explanation

    assertTrue("hits is null and it shouldn't be", hits != null);
    assertTrue("should be 10 hits", hits.totalHits == 10);
    for (int j = 0; j < hits.scoreDocs.length; j++) {
      ScoreDoc doc = hits.scoreDocs[j];
      assertTrue(doc.score + " does not equal: " + 4, doc.score == 4);
      Explanation explain = searcher.explain(query, hits.scoreDocs[j].doc);
      String exp = explain.toString();
      assertTrue(exp, exp.indexOf("MaxPayloadFunction") > -1);
      assertTrue(hits.scoreDocs[j].score + " explain value does not equal: " + 4, explain.getValue() == 4f);
    }
  } 
View Full Code Here

Examples of org.apache.lucene.search.Explanation

    assertTrue("hits is null and it shouldn't be", hits != null);
    assertTrue("should be 10 hits", hits.totalHits == 10);
    for (int j = 0; j < hits.scoreDocs.length; j++) {
      ScoreDoc doc = hits.scoreDocs[j];
      assertTrue(doc.score + " does not equal: " + 2, doc.score == 2);
      Explanation explain = searcher.explain(query, hits.scoreDocs[j].doc);
      String exp = explain.toString();
      assertTrue(exp, exp.indexOf("MinPayloadFunction") > -1);
      assertTrue(hits.scoreDocs[j].score + " explain value does not equal: " + 2, explain.getValue() == 2f);
    }
  } 
View Full Code Here

Examples of solver.explanations.Explanation

    public synchronized Throwable fillInStackTrace() {
        return this;
    }

    public Explanation explain() {
        Explanation expl = new Explanation();
        if (v != null) {
            v.explain(VariableState.DOM, expl);
        } else {
            c.explain(null, expl);
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.