Skip to content

Commit afbd0f7

Browse files
committed
Update descriptor with the new settings
Add the index.cache.query.enabled to the UpdateSettingsDescriptior also
1 parent 8b84301 commit afbd0f7

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

src/Nest/DSL/UpdateSettingsDescriptor.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,15 @@ public UpdateSettingsDescriptor CacheFilterExpire(string cacheFilterExpire)
441441
return this;
442442
}
443443

444+
/// <summary>
445+
/// Enable or disable the query cache.
446+
/// </summary>
447+
public UpdateSettingsDescriptor CacheQueryEnable(bool cacheQueryEnable)
448+
{
449+
this.Self.CacheQueryEnable = cacheQueryEnable;
450+
return this;
451+
}
452+
444453
/// <summary>
445454
/// The gateway snapshot interval (only applies to shared gateways). Defaults to 10s.
446455
/// </summary>

src/Tests/Nest.Tests.Unit/Core/UpdateSettings/AllUpdateSettings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"index.translog.disable_flush": true,
1717
"index.cache.filter.max_size": "1Gb",
1818
"index.cache.filter.expire": "1m",
19+
"index.cache.query.enable": true,
1920
"index.gateway.snapshot_interval": "1h",
2021
"index.routing.allocation.include": {
2122
"_ip": "10.0.0.1"

src/Tests/Nest.Tests.Unit/Core/UpdateSettings/UpdateSettingsTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ public void AllUpdateSettings()
2020
.BlocksWrite()
2121
.CacheFilterExpire("1m")
2222
.CacheFilterMaxSize("1Gb")
23+
.CacheQueryEnable(true)
2324
.CodeBloomLoad()
2425
.Codec("default")
2526
.CompoundFormat()

0 commit comments

Comments
 (0)