Skip to content

Commit 21a3e1e

Browse files
gavinkendallbrjohnstmsft
authored andcommitted
Remove "Format" property in SynonymMap constructor
I recently updated the NuGet packages in the project and it looks like SynonymMap now has a static "Format" property so attempting to use this static property in the constructor, as shown in the sample code here, will result in a compilation error "Static field or property 'SynonymMap.Format' cannot be assigned in an object initializer". This property has "solr" assigned to it as its default value anyway so removing it from the constructor ensures we get a successful build.
1 parent 8e6181d commit 21a3e1e

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

DotNetHowToSynonyms/DotNetHowToSynonyms/Program.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,6 @@ private static void UploadSynonyms(SearchServiceClient serviceClient)
123123
var synonymMap = new SynonymMap()
124124
{
125125
Name = "desc-synonymmap",
126-
Format = "solr",
127126
Synonyms = "hotel, motel\ninternet,wifi\nfive star=>luxury\neconomy,inexpensive=>budget"
128127
};
129128

0 commit comments

Comments
 (0)