Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/.net/20.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
<img src="//i.stack.imgur.com/RUiNP.png" height="16" width="18" alt="" class="sponsor tag img">elasticsearch 如何设置ttl";“生命的时刻”;在播放2中,elasticsearch_<img Src="//i.stack.imgur.com/RUiNP.png" Height="16" Width="18" Alt="" Class="sponsor Tag Img">elasticsearch_Playframework_Ttl - Fatal编程技术网 elasticsearch 如何设置ttl";“生命的时刻”;在播放2中,elasticsearch,elasticsearch,playframework,ttl,elasticsearch,Playframework,Ttl" /> elasticsearch 如何设置ttl";“生命的时刻”;在播放2中,elasticsearch,elasticsearch,playframework,ttl,elasticsearch,Playframework,Ttl" />

elasticsearch 如何设置ttl";“生命的时刻”;在播放2中,elasticsearch

elasticsearch 如何设置ttl";“生命的时刻”;在播放2中,elasticsearch,elasticsearch,playframework,ttl,elasticsearch,Playframework,Ttl,如何在索引上设置“ttl”“生存时间”(这样所有早于“60秒”的结果都将从搜索中删除,例如在play2 elasticsearch()中 在经典的弹性搜索中,可以使用 play2 elasticsearch具有设置选项,我尝试使用此更改 ## Custom settings to apply when creating the index (optional) elasticsearch.index.settings="{'_ttl' : { 'enabled' : true, 'def

如何在索引上设置“ttl”“生存时间”(这样所有早于“60秒”的结果都将从搜索中删除,例如在play2 elasticsearch()中

在经典的弹性搜索中,可以使用

play2 elasticsearch具有设置选项,我尝试使用此更改

## Custom settings to apply when creating the index (optional) elasticsearch.index.settings="{'_ttl' : { 'enabled' : true, 'default' : '60s' }" ##创建索引时要应用的自定义设置(可选) elasticsearch.index.settings=“{'''ttl':{'enabled':true,'default':'60s'}” 但即使在一小时后,搜索结果仍然是可搜索的

我的搜索结果实体的注释如下:

@IndexType(name = "searchResult") public class SearchResult extends Index { ... @IndexType(name=“searchResult”) 公共类搜索结果扩展了索引{。。。 @IndexMapping(value=“{searchResult:{\”\u ttl\:{\“enabled\”:true,\“default\”:\“12h\”}}) (由发行票回答)

@IndexMapping(value = "{ searchResult : { \"_ttl\" : { \"enabled\" : true , \"default\" : \"12h\"} } }")