|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| SimilarityDelegator | Line # 22 | 7 | 7 | 28.6% |
0.2857143
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||
| (38) | |||
| Result | |||
|
0.2857143
|
org.apache.lucene.search.TestComplexExplanations.testBQ22
org.apache.lucene.search.TestComplexExplanations.testBQ22
|
1 PASS | |
|
0.2857143
|
org.apache.lucene.search.TestComplexExplanations.testT3
org.apache.lucene.search.TestComplexExplanations.testT3
|
1 PASS | |
|
0.2857143
|
org.apache.lucene.search.TestComplexExplanations.testDMQ10
org.apache.lucene.search.TestComplexExplanations.testDMQ10
|
1 PASS | |
|
0.2857143
|
org.apache.lucene.search.TestSimpleExplanations.testBQ16
org.apache.lucene.search.TestSimpleExplanations.testBQ16
|
1 PASS | |
|
0.2857143
|
org.apache.lucene.search.TestComplexExplanations.testCSQ4
org.apache.lucene.search.TestComplexExplanations.testCSQ4
|
1 PASS | |
|
0.2857143
|
org.apache.lucene.search.TestBooleanMinShouldMatch.testRandomQueries
org.apache.lucene.search.TestBooleanMinShouldMatch.testRandomQueries
|
1 PASS | |
|
0.2857143
|
org.apache.lucene.search.TestComplexExplanations.testBQ21
org.apache.lucene.search.TestComplexExplanations.testBQ21
|
1 PASS | |
|
0.2857143
|
org.apache.lucene.search.TestSimpleExplanations.testBQ15
org.apache.lucene.search.TestSimpleExplanations.testBQ15
|
1 PASS | |
|
0.2857143
|
org.apache.lucene.search.TestComplexExplanations.testMA3
org.apache.lucene.search.TestComplexExplanations.testMA3
|
1 PASS | |
|
0.2857143
|
org.apache.lucene.search.TestComplexExplanations.testSF3
org.apache.lucene.search.TestComplexExplanations.testSF3
|
1 PASS | |
|
0.2857143
|
org.apache.lucene.search.TestComplexExplanations.testCSQ4
org.apache.lucene.search.TestComplexExplanations.testCSQ4
|
1 PASS | |
|
0.2857143
|
org.apache.lucene.search.TestSimpleExplanations.testBQ16
org.apache.lucene.search.TestSimpleExplanations.testBQ16
|
1 PASS | |
|
0.2857143
|
org.apache.lucene.search.TestComplexExplanations.testMPQ7
org.apache.lucene.search.TestComplexExplanations.testMPQ7
|
1 PASS | |
|
0.2857143
|
org.apache.lucene.search.TestSimpleExplanations.testBQ17
org.apache.lucene.search.TestSimpleExplanations.testBQ17
|
1 PASS | |
|
0.2857143
|
org.apache.lucene.search.TestComplexExplanations.testMPQ7
org.apache.lucene.search.TestComplexExplanations.testMPQ7
|
1 PASS | |
|
0.2857143
|
org.apache.lucene.search.TestComplexExplanations.testSNot6
org.apache.lucene.search.TestComplexExplanations.testSNot6
|
1 PASS | |
|
0.2857143
|
org.apache.lucene.search.TestBoolean2.testRandomQueries
org.apache.lucene.search.TestBoolean2.testRandomQueries
|
1 PASS | |
|
0.2857143
|
org.apache.lucene.search.TestComplexExplanations.testFQ5
org.apache.lucene.search.TestComplexExplanations.testFQ5
|
1 PASS | |
|
0.2857143
|
org.apache.lucene.search.TestComplexExplanations.testFQ5
org.apache.lucene.search.TestComplexExplanations.testFQ5
|
1 PASS | |
|
0.2857143
|
org.apache.lucene.search.TestSimpleExplanations.testBQ14
org.apache.lucene.search.TestSimpleExplanations.testBQ14
|
1 PASS | |
|
0.2857143
|
org.apache.lucene.search.TestConstantScoreRangeQuery.testBoost
org.apache.lucene.search.TestConstantScoreRangeQuery.testBoost
|
1 PASS | |
|
0.2857143
|
org.apache.lucene.search.TestComplexExplanations.testST3
org.apache.lucene.search.TestComplexExplanations.testST3
|
1 PASS | |
|
0.2857143
|
org.apache.lucene.search.TestComplexExplanations.testSF7
org.apache.lucene.search.TestComplexExplanations.testSF7
|
1 PASS | |
|
0.2857143
|
org.apache.lucene.search.TestComplexExplanations.testSNot3
org.apache.lucene.search.TestComplexExplanations.testSNot3
|
1 PASS | |
|
0.2857143
|
org.apache.lucene.search.TestComplexExplanations.testDMQ10
org.apache.lucene.search.TestComplexExplanations.testDMQ10
|
1 PASS | |
|
0.2857143
|
org.apache.lucene.search.TestComplexExplanations.testSF7
org.apache.lucene.search.TestComplexExplanations.testSF7
|
1 PASS | |
|
0.14285715
|
org.apache.lucene.queryParser.TestQueryParser.testLocalDateFormat
org.apache.lucene.queryParser.TestQueryParser.testLocalDateFormat
|
1 PASS | |
|
0.14285715
|
org.apache.lucene.search.TestMultiPhraseQuery.testBooleanQueryContainingSingleTermPrefixQuery
org.apache.lucene.search.TestMultiPhraseQuery.testBooleanQueryContainingSingleTermPrefixQuery
|
1 PASS | |
|
0.14285715
|
org.apache.lucene.search.TestMultiSearcherRanking.testPrefixQuery
org.apache.lucene.search.TestMultiSearcherRanking.testPrefixQuery
|
1 PASS | |
|
0.14285715
|
org.apache.lucene.search.TestRangeQuery.testInclusive
org.apache.lucene.search.TestRangeQuery.testInclusive
|
1 PASS | |
|
0.14285715
|
org.apache.lucene.search.TestPrefixQuery.testPrefixQuery
org.apache.lucene.search.TestPrefixQuery.testPrefixQuery
|
1 PASS | |
|
0.14285715
|
org.apache.lucene.search.TestConstantScoreRangeQuery.testBooleanOrderUnAffected
org.apache.lucene.search.TestConstantScoreRangeQuery.testBooleanOrderUnAffected
|
1 PASS | |
|
0.14285715
|
org.apache.lucene.search.TestWildcard.testAsterisk
org.apache.lucene.search.TestWildcard.testAsterisk
|
1 PASS | |
|
0.14285715
|
org.apache.lucene.search.TestFuzzyQuery.testFuzzinessLong
org.apache.lucene.search.TestFuzzyQuery.testFuzzinessLong
|
1 PASS | |
|
0.14285715
|
org.apache.lucene.search.TestFuzzyQuery.testFuzziness
org.apache.lucene.search.TestFuzzyQuery.testFuzziness
|
1 PASS | |
|
0.14285715
|
org.apache.lucene.search.TestWildcard.testQuestionmark
org.apache.lucene.search.TestWildcard.testQuestionmark
|
1 PASS | |
|
0.14285715
|
org.apache.lucene.search.TestFilteredQuery.testRangeQuery
org.apache.lucene.search.TestFilteredQuery.testRangeQuery
|
1 PASS | |
|
0.14285715
|
org.apache.lucene.search.TestMultiSearcherRanking.testFuzzyQuery
org.apache.lucene.search.TestMultiSearcherRanking.testFuzzyQuery
|
1 PASS | |
| 1 | package org.apache.lucene.search; | |
| 2 | ||
| 3 | /** | |
| 4 | * Copyright 2005 The Apache Software Foundation | |
| 5 | * | |
| 6 | * Licensed under the Apache License, Version 2.0 (the "License"); | |
| 7 | * you may not use this file except in compliance with the License. | |
| 8 | * You may obtain a copy of the License at | |
| 9 | * | |
| 10 | * http://www.apache.org/licenses/LICENSE-2.0 | |
| 11 | * | |
| 12 | * Unless required by applicable law or agreed to in writing, software | |
| 13 | * distributed under the License is distributed on an "AS IS" BASIS, | |
| 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| 15 | * See the License for the specific language governing permissions and | |
| 16 | * limitations under the License. | |
| 17 | */ | |
| 18 | ||
| 19 | /** Expert: Delegating scoring implementation. Useful in {@link | |
| 20 | * Query#getSimilarity(Searcher)} implementations, to override only certain | |
| 21 | * methods of a Searcher's Similiarty implementation.. */ | |
| 22 | public class SimilarityDelegator extends Similarity { | |
| 23 | ||
| 24 | private Similarity delegee; | |
| 25 | ||
| 26 | /** Construct a {@link Similarity} that delegates all methods to another. | |
| 27 | * | |
| 28 | * @param delegee the Similarity implementation to delegate to | |
| 29 | */ | |
| 30 | 27598 |
public SimilarityDelegator(Similarity delegee) { |
| 31 | 27598 | this.delegee = delegee; |
| 32 | } | |
| 33 | ||
| 34 | 0 |
public float lengthNorm(String fieldName, int numTerms) { |
| 35 | 0 | return delegee.lengthNorm(fieldName, numTerms); |
| 36 | } | |
| 37 | ||
| 38 | 10242 |
public float queryNorm(float sumOfSquaredWeights) { |
| 39 | 10242 | return delegee.queryNorm(sumOfSquaredWeights); |
| 40 | } | |
| 41 | ||
| 42 | 0 |
public float tf(float freq) { |
| 43 | 0 | return delegee.tf(freq); |
| 44 | } | |
| 45 | ||
| 46 | 0 |
public float sloppyFreq(int distance) { |
| 47 | 0 | return delegee.sloppyFreq(distance); |
| 48 | } | |
| 49 | ||
| 50 | 0 |
public float idf(int docFreq, int numDocs) { |
| 51 | 0 | return delegee.idf(docFreq, numDocs); |
| 52 | } | |
| 53 | ||
| 54 | 0 |
public float coord(int overlap, int maxOverlap) { |
| 55 | 0 | return delegee.coord(overlap, maxOverlap); |
| 56 | } | |
| 57 | ||
| 58 | } | |
|
||||||||||