Update operation

Vote:
 

Hi,

How should we use Update operation?

Uncompleted example:

            var updateRequest = new UpdateRequestBody
            {
                Language = ScriptLanguage.Native,
                Parameters = new List>
                {
                    {new Tuple("isDeleted", true)}
                },
                Script = "ctx._source.IsDeleted = isDeleted"
            };
            SearchClient.Instance.Update
    [Serializable]
    public class Video
    {
        public string ServiceId { get; set; }
        public string Name { get; set; }
        public bool IsDeleted { get; set; }
    }

What should we use as commandAction?

Did we create correct UpdateRequestBody item? 

I'll be grateful for any links to this topic.

Best regards,

Pavel

#142249
Dec 07, 2015 14:55
Vote:
 

Example setting IsDeleted to true:

client.Update<Video>("147249251").Field(x => x.IsDeleted, true).Execute();
#142250
Dec 07, 2015 15:21
Vote:
 

The only place I have seen Update mentioned in the documentation is at the end of this page:
http://world.episerver.com/documentation/Items/Developers-Guide/EPiServer-Find/11/DotNET-Client-API/Indexing/

#142255
Dec 07, 2015 15:39
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.