@@ -110,31 +110,6 @@ func TestSearch(t *testing.T) {
110110 }
111111 })
112112
113- t .Run ("list" , func (t * testing.T ) {
114- cmd := exec .Command (cliPath ,
115- clustersEntity ,
116- searchEntity ,
117- indexEntity ,
118- "list" ,
119- "--clusterName" , g .clusterName ,
120- "--db=test" ,
121- "--collection" , collectionName ,
122- "--projectId" , g .projectID ,
123- "-o=json" )
124-
125- cmd .Env = os .Environ ()
126- resp , err := cmd .CombinedOutput ()
127-
128- if err != nil {
129- t .Fatalf ("unexpected error: %v, resp: %v" , err , string (resp ))
130- }
131-
132- var indexes []atlasv2.FTSIndex
133- if err := json .Unmarshal (resp , & indexes ); assert .NoError (t , err ) {
134- assert .NotEmpty (t , indexes )
135- }
136- })
137-
138113 t .Run ("Describe" , func (t * testing.T ) {
139114 cmd := exec .Command (cliPath ,
140115 clustersEntity ,
@@ -342,7 +317,7 @@ func TestSearch(t *testing.T) {
342317 },
343318 "author": {
344319 "type": "string",
345- "analyzer": "lucene.english "
320+ "analyzer": "keywordLowerCase "
346321 }
347322 }
348323 },
@@ -352,16 +327,46 @@ func TestSearch(t *testing.T) {
352327 "multi": {
353328 "mySecondaryAnalyzer": {
354329 "type": "string",
355- "analyzer": "lucene.french "
330+ "analyzer": "keywordLowerCase "
356331 }
357332 }
358333 },
359334 "tags": {
360335 "type": "string",
361- "analyzer": "lucene.standard "
336+ "analyzer": "standardLowerCase "
362337 }
363338 }
364- }
339+ },
340+ "analyzers":[
341+ {
342+ "charFilters":[
343+
344+ ],
345+ "name":"keywordLowerCase",
346+ "tokenFilters":[
347+ {
348+ "type":"lowercase"
349+ }
350+ ],
351+ "tokenizer":{
352+ "type":"keyword"
353+ }
354+ },
355+ {
356+ "charFilters":[
357+
358+ ],
359+ "name":"standardLowerCase",
360+ "tokenFilters":[
361+ {
362+ "type":"lowercase"
363+ }
364+ ],
365+ "tokenizer":{
366+ "type":"standard"
367+ }
368+ }
369+ ]
365370}` ))
366371 err = tpl .Execute (file , map [string ]string {
367372 "indexName" : indexName ,
@@ -457,4 +462,29 @@ func TestSearch(t *testing.T) {
457462 assert .Equal (t , index .Name , indexName )
458463 }
459464 })
465+
466+ t .Run ("list" , func (t * testing.T ) {
467+ cmd := exec .Command (cliPath ,
468+ clustersEntity ,
469+ searchEntity ,
470+ indexEntity ,
471+ "list" ,
472+ "--clusterName" , g .clusterName ,
473+ "--db=test" ,
474+ "--collection" , collectionName ,
475+ "--projectId" , g .projectID ,
476+ "-o=json" )
477+
478+ cmd .Env = os .Environ ()
479+ resp , err := cmd .CombinedOutput ()
480+
481+ if err != nil {
482+ t .Fatalf ("unexpected error: %v, resp: %v" , err , string (resp ))
483+ }
484+
485+ var indexes []atlasv2.FTSIndex
486+ if err := json .Unmarshal (resp , & indexes ); assert .NoError (t , err ) {
487+ assert .NotEmpty (t , indexes )
488+ }
489+ })
460490}
0 commit comments