I am using Elasticsearch 5 with Nest 5 on C#.
I have an entity like this:
public class Visitor {
...
public List<ESRecipient> RecipientOf { get; set; }
...
A mapping like this
.Index(ESIndexName)
.Settings(s => s
...
.RefreshInterval("10s")
...
)
.Mappings(m => m
.Map<Visitor>(map => map
// Routing required
.AutoMap().RoutingField(r => r.Required(true))
// Custom Properties
...
.Properties(p => p.Nested<ESRecipient>(n => n.Name(name => name.RecipientOf).AutoMap()))
...
I am doing an update by query like this:
client.UpdateByQuery<Visitor>(u => u
.Script(script => script
.Inline(@"
...
")
)
.ScrollSize(10000)
.RequestsPerSecond(-1)
.Refresh(false)
The problem I have is that when I run the update by query it take around 8 second to update 30000 visitors, but if I change the index RefreshInterval to 30 seconds then the update takes 100 miliseconds to run. So my guess is that Elasticsearch it is just ignoring the refresh=false query string in this case and it is just refresing the index after the update.
What I expect is to avoid the re-index and run this update in 100 ms even if I just leave the index refresh interval to 1 second as it is by default.