store.DatabaseCommands.UpdateByIndex("Raven/DocumentsByEntityName", new IndexQuery() { Query = "Tag: risimported", Cutoff = DateTime.Now.AddMinutes(10) }, new ScriptedPatchRequest() { Script = "this.ImportedOn = new Date(this.ImportedOn)" });
Got this so far...
But im getting an error, any help?...
sByEntityName?query=Tag:risimported -d [{Script:"this.ImportedOn = new Date(thi
s.ImportedOn);"}]
{
"Url": "/bulk_docs/Raven/DocumentsByEntityName?query=Tag:risimported",
"Error": "Raven.Imports.Newtonsoft.Json.JsonReaderException: Error parsing boo
lean value. Path '[0].Script', line 1, position 9.\r\n at Raven.Imports.Newton
soft.Json.JsonTextReader.ParseTrue()\r\n at Raven.Imports.Newtonsoft.Json.Json
adInternal()\r\n at Raven.Imports.Newtonsoft.Json.JsonTextReader.Read()\r\n
at Raven.Json.Linq.RavenJObject.Load(JsonReader reader)\r\n at Raven.Json.Linq
.RavenJArray.Load(JsonReader reader)\r\n at Raven.Json.Linq.RavenJToken.ReadFr
om(JsonReader reader)\r\n at Raven.Abstractions.Json.JsonToJsonConverter.ReadJ
son(JsonReader reader, Type objectType, Object existingValue, JsonSerializer ser
ializer)\r\n at Raven.Imports.Newtonsoft.Json.Serialization.JsonSerializerInte
rnalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAddition
alContent)\r\n at Raven.Imports.Newtonsoft.Json.JsonSerializer.DeserializeInte
rnal(JsonReader reader, Type objectType)\r\n at Raven.Database.Extensions.Http
Extensions.ReadJsonObject[T](IHttpContext context)\r\n at Raven.Database.Serve
r.Responders.DocumentBatch.Respond(IHttpContext context)\r\n at Raven.Database
.Server.HttpServer.DispatchRequest(IHttpContext ctx)\r\n at Raven.Database.Ser
ver.HttpServer.HandleActualRequest(IHttpContext ctx)"
}