Package org.apache.lucene.search

Examples of org.apache.lucene.search.Explanation.addDetail()


          if (valSrcExpls.length == 1) {
            exp.setDescription("CustomMulAdd, sum of:");
            return exp;
          }
          Explanation exp2 = new Explanation(valSrcExpls[1].getValue() * exp.getValue(), "custom score: product of:");
          exp2.addDetail(valSrcExpls[1]);
          exp2.addDetail(exp);
          return exp2;
        }
      };
    }
View Full Code Here


            exp.setDescription("CustomMulAdd, sum of:");
            return exp;
          }
          Explanation exp2 = new Explanation(valSrcExpls[1].getValue() * exp.getValue(), "custom score: product of:");
          exp2.addDetail(valSrcExpls[1]);
          exp2.addDetail(exp);
          return exp2;
        }
      };
    }
  }
View Full Code Here

        }

        @Override public Explanation explain(int docId, Explanation subQueryExpl) {
            float score = score(docId, subQueryExpl.getValue());
            Explanation exp = new Explanation(score, "script score function: product of:");
            exp.addDetail(subQueryExpl);
            return exp;
        }
    }
}
View Full Code Here

        return subQueryScore * boost;
    }

    @Override public Explanation explain(int docId, Explanation subQueryExpl) {
        Explanation exp = new Explanation(boost * subQueryExpl.getValue(), "static boost function: product of:");
        exp.addDetail(subQueryExpl);
        exp.addDetail(new Explanation(boost, "boostFactor"));
        return exp;
    }

    @Override public boolean equals(Object o) {
View Full Code Here

    }

    @Override public Explanation explain(int docId, Explanation subQueryExpl) {
        Explanation exp = new Explanation(boost * subQueryExpl.getValue(), "static boost function: product of:");
        exp.addDetail(subQueryExpl);
        exp.addDetail(new Explanation(boost, "boostFactor"));
        return exp;
    }

    @Override public boolean equals(Object o) {
        if (this == o) return true;
View Full Code Here

                    if (docSet.get(doc)) {
                        filterFunction.function.setNextReader(reader);
                        Explanation functionExplanation = filterFunction.function.explain(doc, subQueryExpl);
                        float sc = getValue() * functionExplanation.getValue();
                        Explanation res = new ComplexExplanation(true, sc, "custom score, product of:");
                        res.addDetail(new Explanation(1.0f, "match filter: " + filterFunction.filter.toString()));
                        res.addDetail(functionExplanation);
                        res.addDetail(new Explanation(getValue(), "queryBoost"));
                        return res;
                    }
                }
View Full Code Here

                        filterFunction.function.setNextReader(reader);
                        Explanation functionExplanation = filterFunction.function.explain(doc, subQueryExpl);
                        float sc = getValue() * functionExplanation.getValue();
                        Explanation res = new ComplexExplanation(true, sc, "custom score, product of:");
                        res.addDetail(new Explanation(1.0f, "match filter: " + filterFunction.filter.toString()));
                        res.addDetail(functionExplanation);
                        res.addDetail(new Explanation(getValue(), "queryBoost"));
                        return res;
                    }
                }
            } else {
View Full Code Here

                        Explanation functionExplanation = filterFunction.function.explain(doc, subQueryExpl);
                        float sc = getValue() * functionExplanation.getValue();
                        Explanation res = new ComplexExplanation(true, sc, "custom score, product of:");
                        res.addDetail(new Explanation(1.0f, "match filter: " + filterFunction.filter.toString()));
                        res.addDetail(functionExplanation);
                        res.addDetail(new Explanation(getValue(), "queryBoost"));
                        return res;
                    }
                }
            } else {
                int count = 0;
View Full Code Here

                        float sc = functionExplanation.getValue();
                        count++;
                        total += sc;
                        max = Math.max(sc, max);
                        Explanation res = new ComplexExplanation(true, sc, "custom score, product of:");
                        res.addDetail(new Explanation(1.0f, "match filter: " + filterFunction.filter.toString()));
                        res.addDetail(functionExplanation);
                        res.addDetail(new Explanation(getValue(), "queryBoost"));
                        filtersExplanations.add(res);
                    }
                }
View Full Code Here

                        count++;
                        total += sc;
                        max = Math.max(sc, max);
                        Explanation res = new ComplexExplanation(true, sc, "custom score, product of:");
                        res.addDetail(new Explanation(1.0f, "match filter: " + filterFunction.filter.toString()));
                        res.addDetail(functionExplanation);
                        res.addDetail(new Explanation(getValue(), "queryBoost"));
                        filtersExplanations.add(res);
                    }
                }
                if (count > 0) {
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.