|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| PhraseScorer | Line # 23 | 62 | 32 | 97.2% |
0.9722222
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||
| (48) | |||
| Result | |||
|
0.9444444
|
org.apache.lucene.search.TestSimpleExplanations.testP5
org.apache.lucene.search.TestSimpleExplanations.testP5
|
1 PASS | |
|
0.9444444
|
org.apache.lucene.search.TestSimpleExplanations.testP2
org.apache.lucene.search.TestSimpleExplanations.testP2
|
1 PASS | |
|
0.9351852
|
org.apache.lucene.search.TestSimpleExplanations.testP3
org.apache.lucene.search.TestSimpleExplanations.testP3
|
1 PASS | |
|
0.9351852
|
org.apache.lucene.search.TestSimpleExplanations.testMPQ2
org.apache.lucene.search.TestSimpleExplanations.testMPQ2
|
1 PASS | |
|
0.9351852
|
org.apache.lucene.search.TestComplexExplanations.test2
org.apache.lucene.search.TestComplexExplanations.test2
|
1 PASS | |
|
0.9351852
|
org.apache.lucene.search.TestComplexExplanations.testMPQ7
org.apache.lucene.search.TestComplexExplanations.testMPQ7
|
1 PASS | |
|
0.9351852
|
org.apache.lucene.search.TestSimpleExplanations.testP6
org.apache.lucene.search.TestSimpleExplanations.testP6
|
1 PASS | |
|
0.9351852
|
org.apache.lucene.search.TestSimpleExplanations.testMPQ5
org.apache.lucene.search.TestSimpleExplanations.testMPQ5
|
1 PASS | |
|
0.9351852
|
org.apache.lucene.search.TestComplexExplanations.test1
org.apache.lucene.search.TestComplexExplanations.test1
|
1 PASS | |
|
0.9259259
|
org.apache.lucene.search.TestSimpleExplanations.testMPQ6
org.apache.lucene.search.TestSimpleExplanations.testMPQ6
|
1 PASS | |
|
0.9259259
|
org.apache.lucene.search.TestSimpleExplanations.testMPQ3
org.apache.lucene.search.TestSimpleExplanations.testMPQ3
|
1 PASS | |
|
0.9259259
|
org.apache.lucene.search.TestSimpleExplanations.testP1
org.apache.lucene.search.TestSimpleExplanations.testP1
|
1 PASS | |
|
0.9259259
|
org.apache.lucene.search.TestSimpleExplanations.testP7
org.apache.lucene.search.TestSimpleExplanations.testP7
|
1 PASS | |
|
0.9259259
|
org.apache.lucene.search.TestSimpleExplanations.testMPQ1
org.apache.lucene.search.TestSimpleExplanations.testMPQ1
|
1 PASS | |
|
0.9259259
|
org.apache.lucene.search.TestSimpleExplanations.testMPQ4
org.apache.lucene.search.TestSimpleExplanations.testMPQ4
|
1 PASS | |
|
0.9259259
|
org.apache.lucene.search.TestSimpleExplanations.testP4
org.apache.lucene.search.TestSimpleExplanations.testP4
|
1 PASS | |
|
0.8518519
|
org.apache.lucene.search.spans.TestBasics.testPhrase
org.apache.lucene.search.spans.TestBasics.testPhrase
|
1 PASS | |
|
0.8518519
|
org.apache.lucene.search.TestPhraseQuery.testPhraseQueryInConjunctionScorer
org.apache.lucene.search.TestPhraseQuery.testPhraseQueryInConjunctionScorer
|
1 PASS | |
|
0.8333333
|
org.apache.lucene.search.TestSimpleExplanations.testMPQ4
org.apache.lucene.search.TestSimpleExplanations.testMPQ4
|
1 PASS | |
|
0.8333333
|
org.apache.lucene.search.TestSimpleExplanations.testP1
org.apache.lucene.search.TestSimpleExplanations.testP1
|
1 PASS | |
|
0.8240741
|
org.apache.lucene.search.TestComplexExplanations.test2
org.apache.lucene.search.TestComplexExplanations.test2
|
1 PASS | |
|
0.8240741
|
org.apache.lucene.search.TestSimpleExplanations.testMPQ5
org.apache.lucene.search.TestSimpleExplanations.testMPQ5
|
1 PASS | |
|
0.8240741
|
org.apache.lucene.search.TestComplexExplanations.testMPQ7
org.apache.lucene.search.TestComplexExplanations.testMPQ7
|
1 PASS | |
|
0.8240741
|
org.apache.lucene.search.TestSimpleExplanations.testP3
org.apache.lucene.search.TestSimpleExplanations.testP3
|
1 PASS | |
|
0.8240741
|
org.apache.lucene.search.TestPhraseQuery.testSlopScoring
org.apache.lucene.search.TestPhraseQuery.testSlopScoring
|
1 PASS | |
|
0.8240741
|
org.apache.lucene.search.TestComplexExplanations.test1
org.apache.lucene.search.TestComplexExplanations.test1
|
1 PASS | |
|
0.8055556
|
org.apache.lucene.search.TestSimpleExplanations.testP6
org.apache.lucene.search.TestSimpleExplanations.testP6
|
1 PASS | |
|
0.8055556
|
org.apache.lucene.search.TestSimpleExplanations.testMPQ2
org.apache.lucene.search.TestSimpleExplanations.testMPQ2
|
1 PASS | |
|
0.8055556
|
org.apache.lucene.search.TestSimpleExplanations.testP2
org.apache.lucene.search.TestSimpleExplanations.testP2
|
1 PASS | |
|
0.8055556
|
org.apache.lucene.search.TestSimpleExplanations.testP5
org.apache.lucene.search.TestSimpleExplanations.testP5
|
1 PASS | |
|
0.7777778
|
org.apache.lucene.search.TestPhraseQuery.testOrderDoesntMatter
org.apache.lucene.search.TestPhraseQuery.testOrderDoesntMatter
|
1 PASS | |
|
0.7777778
|
org.apache.lucene.search.TestPhraseQuery.testMulipleTerms
org.apache.lucene.search.TestPhraseQuery.testMulipleTerms
|
1 PASS | |
|
0.7777778
|
org.apache.lucene.search.TestPhraseQuery.testSlop1
org.apache.lucene.search.TestPhraseQuery.testSlop1
|
1 PASS | |
|
0.7777778
|
org.apache.lucene.search.TestPhraseQuery.testExact
org.apache.lucene.search.TestPhraseQuery.testExact
|
1 PASS | |
|
0.7777778
|
org.apache.lucene.search.TestMultiPhraseQuery.testPhrasePrefix
org.apache.lucene.search.TestMultiPhraseQuery.testPhrasePrefix
|
1 PASS | |
|
0.7592593
|
org.apache.lucene.search.TestPhrasePrefixQuery.testPhrasePrefix
org.apache.lucene.search.TestPhrasePrefixQuery.testPhrasePrefix
|
1 PASS | |
|
0.7592593
|
org.apache.lucene.search.TestPhraseQuery.testPhraseQueryWithStopAnalyzer
org.apache.lucene.search.TestPhraseQuery.testPhraseQueryWithStopAnalyzer
|
1 PASS | |
|
0.7592593
|
org.apache.lucene.search.TestPhraseQuery.testBarelyCloseEnough
org.apache.lucene.search.TestPhraseQuery.testBarelyCloseEnough
|
1 PASS | |
|
0.7592593
|
org.apache.lucene.search.TestSimilarity.testSimilarity
org.apache.lucene.search.TestSimilarity.testSimilarity
|
1 PASS | |
|
0.75
|
org.apache.lucene.index.TestLazyProxSkipping.testLazySkipping
org.apache.lucene.index.TestLazyProxSkipping.testLazySkipping
|
1 PASS | |
|
0.7407407
|
org.apache.lucene.TestSearch.testSearch
org.apache.lucene.TestSearch.testSearch
|
1 PASS | |
|
0.7222222
|
org.apache.lucene.search.TestMultiPhraseQuery.testPhrasePrefixWithBooleanQuery
org.apache.lucene.search.TestMultiPhraseQuery.testPhrasePrefixWithBooleanQuery
|
1 PASS | |
|
0.6851852
|
org.apache.lucene.search.TestPositionIncrement.testSetPosition
org.apache.lucene.search.TestPositionIncrement.testSetPosition
|
1 PASS | |
|
0.6666667
|
org.apache.lucene.search.TestPhraseQuery.testWrappedPhrase
org.apache.lucene.search.TestPhraseQuery.testWrappedPhrase
|
1 PASS | |
|
0.6666667
|
org.apache.lucene.search.TestPhraseQuery.testNotCloseEnough
org.apache.lucene.search.TestPhraseQuery.testNotCloseEnough
|
1 PASS | |
|
0.6666667
|
org.apache.lucene.search.TestRemoteSearchable.testPhraseQuery
org.apache.lucene.search.TestRemoteSearchable.testPhraseQuery
|
1 PASS | |
|
0.37962964
|
org.apache.lucene.search.spans.TestBasics.testPhrase2
org.apache.lucene.search.spans.TestBasics.testPhrase2
|
1 PASS | |
|
0.30555555
|
org.apache.lucene.search.TestMultiSearcherRanking.testMultiPhraseQuery
org.apache.lucene.search.TestMultiSearcherRanking.testMultiPhraseQuery
|
1 PASS | |
| 1 | package org.apache.lucene.search; | |
| 2 | ||
| 3 | /** | |
| 4 | * Copyright 2004 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 | import java.io.IOException; | |
| 20 | ||
| 21 | import org.apache.lucene.index.*; | |
| 22 | ||
| 23 | abstract class PhraseScorer extends Scorer { | |
| 24 | private Weight weight; | |
| 25 | protected byte[] norms; | |
| 26 | protected float value; | |
| 27 | ||
| 28 | private boolean firstTime = true; | |
| 29 | private boolean more = true; | |
| 30 | protected PhraseQueue pq; | |
| 31 | protected PhrasePositions first, last; | |
| 32 | ||
| 33 | private float freq; | |
| 34 | ||
| 35 | ||
| 36 | 230 |
PhraseScorer(Weight weight, TermPositions[] tps, int[] positions, Similarity similarity, |
| 37 | byte[] norms) { | |
| 38 | 230 | super(similarity); |
| 39 | 230 | this.norms = norms; |
| 40 | 230 | this.weight = weight; |
| 41 | 230 | this.value = weight.getValue(); |
| 42 | ||
| 43 | // convert tps to a list | |
| 44 | 709 | for (int i = 0; i < tps.length; i++) { |
| 45 | 479 | PhrasePositions pp = new PhrasePositions(tps[i], positions[i]); |
| 46 | 479 | if (last != null) { // add next to end of list |
| 47 | 249 | last.next = pp; |
| 48 | } else | |
| 49 | ||