Created
December 10, 2015 16:58
-
-
Save allenmichael/136d35689f53d8ddc9c8 to your computer and use it in GitHub Desktop.
Adding a custom field.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[TestMethod] | |
public void Search_Results() | |
{ | |
var searchTuningResource = new Mozu.Api.Resources.Commerce.Catalog.Admin.SearchResource(_apiContext); | |
var settings = searchTuningResource.GetSettingsAsync().Result; | |
settings.SiteSearchSettings[0].CustomFields.Add( | |
new SiteSearchRelevancyCustomField() | |
{ | |
FieldName = "tenant~best-use", | |
FieldWeight = 3 | |
} | |
); | |
var result = searchTuningResource.UpdateSettingsAsync(settings).Result; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment