2727import org .apache .couchdb .nouveau .api .IndexDefinition ;
2828import org .apache .couchdb .nouveau .api .SearchRequest ;
2929import org .apache .couchdb .nouveau .lucene .ParallelSearcherFactory ;
30+ import org .apache .lucene .util .Version ;
3031import org .junit .jupiter .api .AfterEach ;
3132import org .junit .jupiter .api .BeforeEach ;
3233import org .junit .jupiter .api .Test ;
@@ -61,8 +62,7 @@ public void cleanup() throws Exception {
6162
6263 @ Test
6364 public void managerReturnsUsableIndex () throws Exception {
64- final IndexDefinition indexDefinition = new IndexDefinition ();
65- indexDefinition .setDefaultAnalyzer ("standard" );
65+ final IndexDefinition indexDefinition = new IndexDefinition (Version .LATEST .major , "standard" , null );
6666 manager .create ("foo" , indexDefinition );
6767 var searchRequest = new SearchRequest ();
6868 searchRequest .setQuery ("*:*" );
@@ -72,8 +72,7 @@ public void managerReturnsUsableIndex() throws Exception {
7272
7373 @ Test
7474 public void managerReopensAClosedIndex () throws Exception {
75- final IndexDefinition indexDefinition = new IndexDefinition ();
76- indexDefinition .setDefaultAnalyzer ("standard" );
75+ final IndexDefinition indexDefinition = new IndexDefinition (Version .LATEST .major , "standard" , null );
7776
7877 manager .create ("bar" , indexDefinition );
7978
@@ -90,8 +89,7 @@ public void managerReopensAClosedIndex() throws Exception {
9089
9190 @ Test
9291 public void deleteAllRemovesIndexByName () throws Exception {
93- final IndexDefinition indexDefinition = new IndexDefinition ();
94- indexDefinition .setDefaultAnalyzer ("standard" );
92+ final IndexDefinition indexDefinition = new IndexDefinition (Version .LATEST .major , "standard" , null );
9593
9694 assertThat (countIndexes ()).isEqualTo (0 );
9795 manager .create ("bar" , indexDefinition );
@@ -102,8 +100,7 @@ public void deleteAllRemovesIndexByName() throws Exception {
102100
103101 @ Test
104102 public void deleteAllRemovesIndexByPath () throws Exception {
105- final IndexDefinition indexDefinition = new IndexDefinition ();
106- indexDefinition .setDefaultAnalyzer ("standard" );
103+ final IndexDefinition indexDefinition = new IndexDefinition (Version .LATEST .major , "standard" , null );
107104
108105 assertThat (countIndexes ()).isEqualTo (0 );
109106 manager .create ("foo/bar" , indexDefinition );
@@ -114,8 +111,7 @@ public void deleteAllRemovesIndexByPath() throws Exception {
114111
115112 @ Test
116113 public void deleteAllRemovesIndexByGlob () throws Exception {
117- final IndexDefinition indexDefinition = new IndexDefinition ();
118- indexDefinition .setDefaultAnalyzer ("standard" );
114+ final IndexDefinition indexDefinition = new IndexDefinition (Version .LATEST .major , "standard" , null );
119115
120116 assertThat (countIndexes ()).isEqualTo (0 );
121117 manager .create ("foo/bar" , indexDefinition );
@@ -126,8 +122,7 @@ public void deleteAllRemovesIndexByGlob() throws Exception {
126122
127123 @ Test
128124 public void deleteAllRemovesIndexByGlobExceptExclusions () throws Exception {
129- final IndexDefinition indexDefinition = new IndexDefinition ();
130- indexDefinition .setDefaultAnalyzer ("standard" );
125+ final IndexDefinition indexDefinition = new IndexDefinition (Version .LATEST .major , "standard" , null );
131126
132127 assertThat (countIndexes ()).isEqualTo (0 );
133128 manager .create ("foo/bar" , indexDefinition );
0 commit comments