|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| PhraseQuery | Line # 33 | 44 | 22 | 82.9% |
0.82894737
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||
| PhraseQuery.PhraseWeight | Line # 106 | 64 | 16 | 90% |
0.9
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||
| (43) | |||
| Result | |||
|
0.8373494
|
org.apache.lucene.search.TestSimpleExplanations.testP3
org.apache.lucene.search.TestSimpleExplanations.testP3
|
1 PASS | |
|
0.8373494
|
org.apache.lucene.search.TestSimpleExplanations.testP7
org.apache.lucene.search.TestSimpleExplanations.testP7
|
1 PASS | |
|
0.8373494
|
org.apache.lucene.search.TestSimpleExplanations.testP5
org.apache.lucene.search.TestSimpleExplanations.testP5
|
1 PASS | |
|
0.8373494
|
org.apache.lucene.search.TestSimpleExplanations.testP6
org.apache.lucene.search.TestSimpleExplanations.testP6
|
1 PASS | |
|
0.8373494
|
org.apache.lucene.search.TestSimpleExplanations.testP4
org.apache.lucene.search.TestSimpleExplanations.testP4
|
1 PASS | |
|
0.82530123
|
org.apache.lucene.search.TestSimpleExplanations.testP1
org.apache.lucene.search.TestSimpleExplanations.testP1
|
1 PASS | |
|
0.82530123
|
org.apache.lucene.search.TestComplexExplanations.test2
org.apache.lucene.search.TestComplexExplanations.test2
|
1 PASS | |
|
0.82530123
|
org.apache.lucene.search.TestComplexExplanations.test1
org.apache.lucene.search.TestComplexExplanations.test1
|
1 PASS | |
|
0.82530123
|
org.apache.lucene.search.TestSimpleExplanations.testP2
org.apache.lucene.search.TestSimpleExplanations.testP2
|
1 PASS | |
|
0.78313255
|
org.apache.lucene.search.TestComplexExplanations.test2
org.apache.lucene.search.TestComplexExplanations.test2
|
1 PASS | |
|
0.78313255
|
org.apache.lucene.search.TestSimpleExplanations.testP6
org.apache.lucene.search.TestSimpleExplanations.testP6
|
1 PASS | |
|
0.78313255
|
org.apache.lucene.search.TestSimpleExplanations.testP3
org.apache.lucene.search.TestSimpleExplanations.testP3
|
1 PASS | |
|
0.78313255
|
org.apache.lucene.search.TestSimpleExplanations.testP5
org.apache.lucene.search.TestSimpleExplanations.testP5
|
1 PASS | |
|
0.78313255
|
org.apache.lucene.search.TestComplexExplanations.test1
org.apache.lucene.search.TestComplexExplanations.test1
|
1 PASS | |
|
0.7710843
|
org.apache.lucene.search.TestSimpleExplanations.testP2
org.apache.lucene.search.TestSimpleExplanations.testP2
|
1 PASS | |
|
0.7710843
|
org.apache.lucene.search.TestSimpleExplanations.testP1
org.apache.lucene.search.TestSimpleExplanations.testP1
|
1 PASS | |
|
0.48795182
|
org.apache.lucene.search.spans.TestBasics.testPhrase2
org.apache.lucene.search.spans.TestBasics.testPhrase2
|
1 PASS | |
|
0.48795182
|
org.apache.lucene.search.spans.TestBasics.testPhrase
org.apache.lucene.search.spans.TestBasics.testPhrase
|
1 PASS | |
|
0.45783132
|
org.apache.lucene.TestSearch.testSearch
org.apache.lucene.TestSearch.testSearch
|
1 PASS | |
|
0.39156628
|
org.apache.lucene.search.TestPhraseQuery.testOrderDoesntMatter
org.apache.lucene.search.TestPhraseQuery.testOrderDoesntMatter
|
1 PASS | |
|
0.39156628
|
org.apache.lucene.search.TestPhraseQuery.testSlopScoring
org.apache.lucene.search.TestPhraseQuery.testSlopScoring
|
1 PASS | |
|
0.39156628
|
org.apache.lucene.search.TestPhraseQuery.testMulipleTerms
org.apache.lucene.search.TestPhraseQuery.testMulipleTerms
|
1 PASS | |
|
0.39156628
|
org.apache.lucene.search.TestPhraseQuery.testSlop1
org.apache.lucene.search.TestPhraseQuery.testSlop1
|
1 PASS | |
|
0.38554215
|
org.apache.lucene.search.TestPhraseQuery.testWrappedPhrase
org.apache.lucene.search.TestPhraseQuery.testWrappedPhrase
|
1 PASS | |
|
0.38554215
|
org.apache.lucene.search.TestPhraseQuery.testNotCloseEnough
org.apache.lucene.search.TestPhraseQuery.testNotCloseEnough
|
1 PASS | |
|
0.38554215
|
org.apache.lucene.search.TestPhraseQuery.testBarelyCloseEnough
org.apache.lucene.search.TestPhraseQuery.testBarelyCloseEnough
|
1 PASS | |
|
0.37951806
|
org.apache.lucene.search.TestPhraseQuery.testPhraseQueryWithStopAnalyzer
org.apache.lucene.search.TestPhraseQuery.testPhraseQueryWithStopAnalyzer
|
1 PASS | |
|
0.37951806
|
org.apache.lucene.search.TestPhraseQuery.testPhraseQueryInConjunctionScorer
org.apache.lucene.search.TestPhraseQuery.testPhraseQueryInConjunctionScorer
|
1 PASS | |
|
0.37951806
|
org.apache.lucene.search.TestPhraseQuery.testExact
org.apache.lucene.search.TestPhraseQuery.testExact
|
1 PASS | |
|
0.3493976
|
org.apache.lucene.search.TestSimilarity.testSimilarity
org.apache.lucene.search.TestSimilarity.testSimilarity
|
1 PASS | |
|
0.3493976
|
org.apache.lucene.search.TestMultiSearcherRanking.testMultiPhraseQuery
org.apache.lucene.search.TestMultiSearcherRanking.testMultiPhraseQuery
|
1 PASS | |
|
0.33734939
|
org.apache.lucene.search.TestRemoteSearchable.testPhraseQuery
org.apache.lucene.search.TestRemoteSearchable.testPhraseQuery
|
1 PASS | |
|
0.3253012
|
org.apache.lucene.search.TestPositionIncrement.testSetPosition
org.apache.lucene.search.TestPositionIncrement.testSetPosition
|
1 PASS | |
|
0.3253012
|
org.apache.lucene.index.TestLazyProxSkipping.testLazySkipping
org.apache.lucene.index.TestLazyProxSkipping.testLazySkipping
|
1 PASS | |
|
0.25301206
|
org.apache.lucene.queryParser.TestMultiFieldQueryParser.testSimple
org.apache.lucene.queryParser.TestMultiFieldQueryParser.testSimple
|
1 PASS | |
|
0.24096386
|
org.apache.lucene.queryParser.TestQueryParser.testSimple
org.apache.lucene.queryParser.TestQueryParser.testSimple
|
1 PASS | |
|
0.24096386
|
org.apache.lucene.queryParser.TestMultiAnalyzer.testMultiAnalyzer
org.apache.lucene.queryParser.TestMultiAnalyzer.testMultiAnalyzer
|
1 PASS | |
|
0.23493975
|
org.apache.lucene.search.TestSimpleExplanations.testP7
org.apache.lucene.search.TestSimpleExplanations.testP7
|
1 PASS | |
|
0.23493975
|
org.apache.lucene.search.TestSimpleExplanations.testP4
org.apache.lucene.search.TestSimpleExplanations.testP4
|
1 PASS | |
|
0.23493975
|
org.apache.lucene.queryParser.TestQueryParser.testSlop
org.apache.lucene.queryParser.TestQueryParser.testSlop
|
1 PASS | |
|
0.23493975
|
org.apache.lucene.queryParser.TestMultiAnalyzer.testMultiAnalyzerWithSubclassOfQueryParser
org.apache.lucene.queryParser.TestMultiAnalyzer.testMultiAnalyzerWithSubclassOfQueryParser
|
1 PASS | |
|
0.22289157
|
org.apache.lucene.queryParser.TestQueryParser.testQPA
org.apache.lucene.queryParser.TestQueryParser.testQPA
|
1 PASS | |
|
0.22289157
|
org.apache.lucene.queryParser.TestMultiAnalyzer.testPosIncrementAnalyzer
org.apache.lucene.queryParser.TestMultiAnalyzer.testPosIncrementAnalyzer
|
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 java.util.Set; | |
| 21 | import java.util.Vector; | |
| 22 | ||
| 23 | import org.apache.lucene.index.Term; | |
| 24 | import org.apache.lucene.index.TermPositions; | |
| 25 | import org.apache.lucene.index.IndexReader; | |
| 26 | import org.apache.lucene.util.ToStringUtils; | |
| 27 | ||
| 28 | /** A Query that matches documents containing a particular sequence of terms. | |
| 29 | * A PhraseQuery is built by QueryParser for input like <code>"new york"</code>. | |
| 30 | * | |
| 31 | * <p>This query may be combined with other terms or queries with a {@link BooleanQuery}. | |
| 32 | */ | |
| 33 | public class PhraseQuery extends Query { | |
| 34 | private String field; | |
| 35 | private Vector terms = new Vector(); | |
| 36 | private Vector positions = new Vector(); | |
| 37 | private int slop = 0; | |
| 38 | ||
| 39 | /** Constructs an empty phrase query. */ | |