Package org.apache.lucene.search

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


                        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

                        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) {
                    float sc = 0;
View Full Code Here

                            break;
                    }
                    sc *= getValue();
                    Explanation res = new ComplexExplanation(true, sc, "custom score, score mode [" + scoreMode.toString().toLowerCase() + "]");
                    for (Explanation explanation : filtersExplanations) {
                        res.addDetail(explanation);
                    }
                    return res;
                }
            }

View Full Code Here

                }
            }

            float sc = getValue() * subQueryExpl.getValue();
            Explanation res = new ComplexExplanation(true, sc, "custom score, no filter match, product of:");
            res.addDetail(subQueryExpl);
            res.addDetail(new Explanation(getValue(), "queryBoost"));
            return res;
        }
    }

View Full Code Here

            }

            float sc = getValue() * subQueryExpl.getValue();
            Explanation res = new ComplexExplanation(true, sc, "custom score, no filter match, product of:");
            res.addDetail(subQueryExpl);
            res.addDetail(new Explanation(getValue(), "queryBoost"));
            return res;
        }
    }


View Full Code Here

            function.setNextReader(reader);
            Explanation functionExplanation = function.explain(doc, subQueryExpl);
            float sc = getValue() * functionExplanation.getValue();
            Explanation res = new ComplexExplanation(true, sc, "custom score, product of:");
            res.addDetail(functionExplanation);
            res.addDetail(new Explanation(getValue(), "queryBoost"));
            return res;
        }
    }

View Full Code Here

            function.setNextReader(reader);
            Explanation functionExplanation = function.explain(doc, subQueryExpl);
            float sc = getValue() * functionExplanation.getValue();
            Explanation res = new ComplexExplanation(true, sc, "custom score, product of:");
            res.addDetail(functionExplanation);
            res.addDetail(new Explanation(getValue(), "queryBoost"));
            return res;
        }
    }


View Full Code Here

    queryExpl.setValue(boostExpl.getValue() *
                       idfExpl.getValue() *
                       queryNormExpl.getValue());

    result.addDetail(queryExpl);

    // explain field weight
    ComplexExplanation fieldExpl = new ComplexExplanation();
    fieldExpl.setDescription("fieldWeight("+field+":"+query.toString(field)+
                             " in "+doc+"), product of:");
View Full Code Here

    ComplexExplanation fieldExpl = new ComplexExplanation();
    fieldExpl.setDescription("fieldWeight("+field+":"+query.toString(field)+
                             " in "+doc+"), product of:");

    Explanation tfExpl = scorer(reader).explain(doc);
    fieldExpl.addDetail(tfExpl);
    fieldExpl.addDetail(idfExpl);

    Explanation fieldNormExpl = new Explanation();
    byte[] fieldNorms = reader.norms(field);
    float fieldNorm =
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.