|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| PhrasePositions | Line # 22 | 22 | 8 | 100% |
1.0
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||
| (48) | |||
| Result | |||
|
1.0
|
org.apache.lucene.search.TestSimpleExplanations.testMPQ6
org.apache.lucene.search.TestSimpleExplanations.testMPQ6
|
1 PASS | |
|
1.0
|
org.apache.lucene.search.TestPhrasePrefixQuery.testPhrasePrefix
org.apache.lucene.search.TestPhrasePrefixQuery.testPhrasePrefix
|
1 PASS | |
|
1.0
|
org.apache.lucene.search.TestSimpleExplanations.testMPQ3
org.apache.lucene.search.TestSimpleExplanations.testMPQ3
|
1 PASS | |
|
1.0
|
org.apache.lucene.search.TestPhraseQuery.testOrderDoesntMatter
org.apache.lucene.search.TestPhraseQuery.testOrderDoesntMatter
|
1 PASS | |
|
1.0
|
org.apache.lucene.search.TestSimpleExplanations.testP7
org.apache.lucene.search.TestSimpleExplanations.testP7
|
1 PASS | |
|
1.0
|
org.apache.lucene.search.TestSimpleExplanations.testMPQ1
org.apache.lucene.search.TestSimpleExplanations.testMPQ1
|
1 PASS | |
|
1.0
|
org.apache.lucene.search.TestPhraseQuery.testPhraseQueryWithStopAnalyzer
org.apache.lucene.search.TestPhraseQuery.testPhraseQueryWithStopAnalyzer
|
1 PASS | |
|
1.0
|
org.apache.lucene.search.TestPhraseQuery.testBarelyCloseEnough
org.apache.lucene.search.TestPhraseQuery.testBarelyCloseEnough
|
1 PASS | |
|
1.0
|
org.apache.lucene.search.TestPhraseQuery.testMulipleTerms
org.apache.lucene.search.TestPhraseQuery.testMulipleTerms
|
1 PASS | |
|
1.0
|
org.apache.lucene.search.TestPhraseQuery.testSlop1
org.apache.lucene.search.TestPhraseQuery.testSlop1
|
1 PASS | |
|
1.0
|
org.apache.lucene.search.TestSimpleExplanations.testP4
org.apache.lucene.search.TestSimpleExplanations.testP4
|
1 PASS | |
|
1.0
|
org.apache.lucene.search.TestPhraseQuery.testExact
org.apache.lucene.search.TestPhraseQuery.testExact
|
1 PASS | |
|
1.0
|
org.apache.lucene.search.TestMultiPhraseQuery.testPhrasePrefix
org.apache.lucene.search.TestMultiPhraseQuery.testPhrasePrefix
|
1 PASS | |
|
0.8787879
|
org.apache.lucene.search.TestSimpleExplanations.testP3
org.apache.lucene.search.TestSimpleExplanations.testP3
|
1 PASS | |
|
0.8787879
|
org.apache.lucene.search.TestPhraseQuery.testWrappedPhrase
org.apache.lucene.search.TestPhraseQuery.testWrappedPhrase
|
1 PASS | |
|
0.8787879
|
org.apache.lucene.search.TestSimpleExplanations.testMPQ2
org.apache.lucene.search.TestSimpleExplanations.testMPQ2
|
1 PASS | |
|
0.8787879
|
org.apache.lucene.search.TestComplexExplanations.test2
org.apache.lucene.search.TestComplexExplanations.test2
|
1 PASS | |
|
0.8787879
|
org.apache.lucene.search.TestSimpleExplanations.testMPQ5
org.apache.lucene.search.TestSimpleExplanations.testMPQ5
|
1 PASS | |
|
0.8787879
|
org.apache.lucene.search.TestSimpleExplanations.testP1
org.apache.lucene.search.TestSimpleExplanations.testP1
|
1 PASS | |
|
0.8787879
|
org.apache.lucene.search.TestComplexExplanations.test2
org.apache.lucene.search.TestComplexExplanations.test2
|
1 PASS | |
|
0.8787879
|
org.apache.lucene.TestSearch.testSearch
org.apache.lucene.TestSearch.testSearch
|
1 PASS | |
|
0.8787879
|
org.apache.lucene.search.TestPhraseQuery.testNotCloseEnough
org.apache.lucene.search.TestPhraseQuery.testNotCloseEnough
|
1 PASS | |
|
0.8787879
|
org.apache.lucene.search.TestSimpleExplanations.testMPQ4
org.apache.lucene.search.TestSimpleExplanations.testMPQ4
|
1 PASS | |
|
0.8787879
|
org.apache.lucene.search.TestSimpleExplanations.testP5
org.apache.lucene.search.TestSimpleExplanations.testP5
|
1 PASS | |
|
0.8787879
|
org.apache.lucene.search.TestComplexExplanations.testMPQ7
org.apache.lucene.search.TestComplexExplanations.testMPQ7
|
1 PASS | |
|
0.8787879
|
org.apache.lucene.search.TestSimpleExplanations.testP3
org.apache.lucene.search.TestSimpleExplanations.testP3
|
1 PASS | |
|
0.8787879
|
org.apache.lucene.search.TestComplexExplanations.testMPQ7
org.apache.lucene.search.TestComplexExplanations.testMPQ7
|
1 PASS | |
|
0.8787879
|
org.apache.lucene.search.TestSimpleExplanations.testP6
org.apache.lucene.search.TestSimpleExplanations.testP6
|
1 PASS | |
|
0.8787879
|
org.apache.lucene.search.TestSimpleExplanations.testP1
org.apache.lucene.search.TestSimpleExplanations.testP1
|
1 PASS | |
|
0.8787879
|
org.apache.lucene.search.TestSimpleExplanations.testMPQ5
org.apache.lucene.search.TestSimpleExplanations.testMPQ5
|
1 PASS | |
|
0.8787879
|
org.apache.lucene.search.TestComplexExplanations.test1
org.apache.lucene.search.TestComplexExplanations.test1
|
1 PASS | |
|
0.8787879
|
org.apache.lucene.search.TestPhraseQuery.testSlopScoring
org.apache.lucene.search.TestPhraseQuery.testSlopScoring
|
1 PASS | |
|
0.8787879
|
org.apache.lucene.search.spans.TestBasics.testPhrase
org.apache.lucene.search.spans.TestBasics.testPhrase
|
1 PASS | |
|
0.8787879
|
org.apache.lucene.search.TestMultiPhraseQuery.testPhrasePrefixWithBooleanQuery
org.apache.lucene.search.TestMultiPhraseQuery.testPhrasePrefixWithBooleanQuery
|
1 PASS | |
|
0.8787879
|
org.apache.lucene.search.TestSimilarity.testSimilarity
org.apache.lucene.search.TestSimilarity.testSimilarity
|
1 PASS | |
|
0.8787879
|
org.apache.lucene.index.TestLazyProxSkipping.testLazySkipping
org.apache.lucene.index.TestLazyProxSkipping.testLazySkipping
|
1 PASS | |
|
0.8787879
|
org.apache.lucene.search.TestSimpleExplanations.testP2
org.apache.lucene.search.TestSimpleExplanations.testP2
|
1 PASS | |
|
0.8787879
|
org.apache.lucene.search.TestSimpleExplanations.testMPQ4
org.apache.lucene.search.TestSimpleExplanations.testMPQ4
|
1 PASS | |
|
0.8787879
|
org.apache.lucene.search.TestPhraseQuery.testPhraseQueryInConjunctionScorer
org.apache.lucene.search.TestPhraseQuery.testPhraseQueryInConjunctionScorer
|
1 PASS | |
|
0.8787879
|
org.apache.lucene.search.TestComplexExplanations.test1
org.apache.lucene.search.TestComplexExplanations.test1
|
1 PASS | |
|
0.75757575
|
org.apache.lucene.search.TestSimpleExplanations.testP6
org.apache.lucene.search.TestSimpleExplanations.testP6
|
1 PASS | |
|
0.75757575
|
org.apache.lucene.search.TestSimpleExplanations.testMPQ2
org.apache.lucene.search.TestSimpleExplanations.testMPQ2
|
1 PASS | |
|
0.75757575
|
org.apache.lucene.search.TestSimpleExplanations.testP2
org.apache.lucene.search.TestSimpleExplanations.testP2
|
1 PASS | |
|
0.75757575
|
org.apache.lucene.search.TestSimpleExplanations.testP5
org.apache.lucene.search.TestSimpleExplanations.testP5
|
1 PASS | |
|
0.6969697
|
org.apache.lucene.search.TestPositionIncrement.testSetPosition
org.apache.lucene.search.TestPositionIncrement.testSetPosition
|
1 PASS | |
|
0.6969697
|
org.apache.lucene.search.TestRemoteSearchable.testPhraseQuery
org.apache.lucene.search.TestRemoteSearchable.testPhraseQuery
|
1 PASS | |
|
0.45454547
|
org.apache.lucene.search.spans.TestBasics.testPhrase2
org.apache.lucene.search.spans.TestBasics.testPhrase2
|
1 PASS | |
|
0.3939394
|
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 | import org.apache.lucene.index.*; | |
| 21 | ||
| 22 | final class PhrasePositions { | |
| 23 | int doc; // current doc | |
| 24 | int position; // position in doc | |
| 25 | int count; // remaining pos in this doc | |
| 26 | int offset; // position in phrase | |
| 27 | TermPositions tp; // stream of positions | |
| 28 | PhrasePositions next; // used to make lists | |
| 29 | ||
| 30 | 479 |
PhrasePositions(TermPositions t, int o) { |
| 31 | 479 | tp = t; |
| 32 | 479 | offset = o; |
| 33 | } | |
| 34 | ||
| 35 | 1009 |
final boolean next() throws IOException { // increments to next doc |
| 36 | 1009 | if (!tp.next()) { |
| 37 | 149 | tp.close(); // close stream |
| 38 | 149 | doc = Integer.MAX_VALUE; // sentinel value |
| 39 | 149 | return false; |
| 40 | } | |
| 41 | 860 | doc = tp.doc(); |
| 42 | 860 | position = 0; |
| 43 | 860 | return true; |
| 44 | } | |
| 45 | ||
| 46 | 907 |
final boolean skipTo(int target) throws IOException { |
| 47 | 907 | if (!tp.skipTo(target)) { |
| 48 | 25 | tp.close(); // close stream |
| 49 | 25 | doc = Integer.MAX_VALUE; // sentinel value |
| 50 | 25 | return false; |
| 51 | } | |
| 52 | 882 | doc = tp.doc(); |
| 53 | 882 | position = 0; |
| 54 | 882 | return true; |
| 55 | } | |
| 56 | ||
| 57 | ||
| 58 | 1447 |
final void firstPosition() throws IOException { |