File tree Expand file tree Collapse file tree
src/Serval/src/Serval.Translation/Configuration Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -63,19 +63,19 @@ await c.Aggregate()
6363 . ToListAsync ( ) ;
6464
6565 //migrate by adding TargetQuoteConvention field populated from deprecated analysis field
66- // await c.Aggregate()
67- // .Match(Builders<Build>.Filter.Exists(b => b.TargetQuoteConvention, false))
68- // .Match(Builders<Build>.Filter.Exists("analysis"))
69- // .Unwind("analysis")
70- // .Match(Builders<BsonDocument>.Filter.Ne("$ analysis.targetQuoteConvention", ""))
71- // .AppendStage<BsonDocument>(
72- // new BsonDocument(
73- // "$set",
74- // new BsonDocument("targetQuoteConvention", "$analysis.targetQuoteConvention")
75- // )
76- // )
77- // .Merge(c, new MergeStageOptions<Build> { WhenMatched = MergeStageWhenMatched.Replace })
78- // .ToListAsync();
66+ await c . Aggregate ( )
67+ . Match ( Builders < Build > . Filter . Exists ( b => b . TargetQuoteConvention , false ) )
68+ . Match ( Builders < Build > . Filter . Exists ( "analysis" ) )
69+ . Unwind ( "analysis" )
70+ . Match ( Builders < BsonDocument > . Filter . Ne ( "analysis.targetQuoteConvention" , "" ) )
71+ . AppendStage < BsonDocument > (
72+ new BsonDocument (
73+ "$set" ,
74+ new BsonDocument ( "targetQuoteConvention" , "$analysis.targetQuoteConvention" )
75+ )
76+ )
77+ . Merge ( c , new MergeStageOptions < Build > { WhenMatched = MergeStageWhenMatched . Replace } )
78+ . ToListAsync ( ) ;
7979 }
8080 ) ;
8181 configurator . AddRepository < Pretranslation > (
You can’t perform that action at this time.
0 commit comments