Create an index in a list using CSOM

I have been asked about how to create an list index programmatically in SharePoint 2010\2013\2016. You can do that using server object model as follows: using (SPSite site = new SPSite(“http://SHAREPOINT_SITE_URL”)) using (SPWeb web = site.OpenWeb()) { SPList list = web.Lists[“LIST_TITLE”]; SPField field = list.Fields[“FIELD_NAME”]; field.Indexed = true; field.Update(); } For Office 365 or for SharePoint…

0