Example usage for org.apache.lucene.search Explanation noMatch

List of usage examples for org.apache.lucene.search Explanation noMatch

Introduction

In this page you can find the example usage for org.apache.lucene.search Explanation noMatch.

Prototype

public static Explanation noMatch(String description, Explanation... details) 

Source Link

Document

Create a new explanation for a document which does not match.

Usage

From source file:org.codelibs.elasticsearch.common.lucene.Lucene.java

License:Apache License

public static Explanation readExplanation(StreamInput in) throws IOException {
    boolean match = in.readBoolean();
    String description = in.readString();
    final Explanation[] subExplanations = new Explanation[in.readVInt()];
    for (int i = 0; i < subExplanations.length; ++i) {
        subExplanations[i] = readExplanation(in);
    }/*from  ww  w .  ja  v  a  2s .c o  m*/
    if (match) {
        return Explanation.match(in.readFloat(), description, subExplanations);
    } else {
        return Explanation.noMatch(description, subExplanations);
    }
}