File tree Expand file tree Collapse file tree 3 files changed +8
-9
lines changed
suggester/src/test/java/org/opengrok/suggest Expand file tree Collapse file tree 3 files changed +8
-9
lines changed Original file line number Diff line number Diff line change 31
31
import org .apache .lucene .index .Term ;
32
32
import org .apache .lucene .search .suggest .Lookup ;
33
33
import org .apache .lucene .store .Directory ;
34
- import org .apache .lucene .store .RAMDirectory ;
35
34
import org .apache .lucene .util .BytesRef ;
36
35
import org .hamcrest .Matchers ;
37
36
import org .junit .After ;
@@ -69,7 +68,7 @@ public class SuggesterProjectDataTest {
69
68
@ Before
70
69
@ SuppressWarnings ("deprecation" ) // for RAMDirectory
71
70
public void setUp () throws IOException {
72
- dir = new RAMDirectory ();
71
+ dir = new org . apache . lucene . store . RAMDirectory ();
73
72
tempDir = Files .createTempDirectory ("test" );
74
73
}
75
74
@@ -265,7 +264,7 @@ public void getSearchCountMapNullTest() throws IOException {
265
264
@ Test
266
265
@ SuppressWarnings ("deprecation" ) // for RAMDirectory
267
266
public void testRemove () throws IOException {
268
- Directory dir = new RAMDirectory ();
267
+ Directory dir = new org . apache . lucene . store . RAMDirectory ();
269
268
Path tempDir = Files .createTempDirectory ("test" );
270
269
271
270
try (IndexWriter iw = new IndexWriter (dir , new IndexWriterConfig ())) {
Original file line number Diff line number Diff line change 32
32
import org .apache .lucene .index .Term ;
33
33
import org .apache .lucene .search .TermQuery ;
34
34
import org .apache .lucene .store .Directory ;
35
- import org .apache .lucene .store .RAMDirectory ;
36
35
import org .apache .lucene .util .BytesRef ;
37
36
import org .junit .AfterClass ;
38
37
import org .junit .BeforeClass ;
52
51
import static org .hamcrest .MatcherAssert .assertThat ;
53
52
import static org .hamcrest .Matchers .contains ;
54
53
55
- @ SuppressWarnings ("deprecation" ) // for RAMDirectory
56
54
public class SuggesterSearcherTest {
57
55
58
56
private static Directory dir ;
59
57
60
58
private static SuggesterSearcher searcher ;
61
59
62
60
@ BeforeClass
61
+ @ SuppressWarnings ("deprecation" ) // for RAMDirectory
63
62
public static void setUpClass () throws IOException {
64
- dir = new RAMDirectory ();
63
+ dir = new org . apache . lucene . store . RAMDirectory ();
65
64
66
65
try (IndexWriter iw = new IndexWriter (dir , new IndexWriterConfig ())) {
67
66
Document doc1 = new Document ();
Original file line number Diff line number Diff line change 35
35
import org .apache .lucene .search .Scorer ;
36
36
import org .apache .lucene .search .TwoPhaseIterator ;
37
37
import org .apache .lucene .search .Weight ;
38
- import org .apache .lucene .store .RAMDirectory ;
38
+ import org .apache .lucene .store .Directory ;
39
39
import org .junit .Test ;
40
40
import org .opengrok .suggest .query .PhraseScorer ;
41
41
import org .opengrok .suggest .query .data .BitIntsHolder ;
47
47
import static org .hamcrest .collection .IsIterableContainingInOrder .contains ;
48
48
import static org .junit .Assert .assertThat ;
49
49
50
+ @ SuppressWarnings ("deprecation" ) // for RAMDirectory
50
51
public class CustomSloppyPhraseScorerTest {
51
52
52
- @ SuppressWarnings ({ "deprecation" , " unchecked"} ) // for RAMDirectory, contains()
53
+ @ SuppressWarnings (" unchecked" ) // for contains()
53
54
public static void test (
54
55
final int slop ,
55
56
final int offset ,
56
57
final String [] terms ,
57
58
final Integer [] expectedPositions
58
59
) throws IOException {
59
- RAMDirectory dir = new RAMDirectory ();
60
+ Directory dir = new org . apache . lucene . store . RAMDirectory ();
60
61
61
62
try (IndexWriter iw = new IndexWriter (dir , new IndexWriterConfig ())) {
62
63
Document doc = new Document ();
You can’t perform that action at this time.
0 commit comments