elasticsearch运行时字段脚本案例

if(doc['content'].size()>0){

    def content = doc['content'].value;

    String redisKeyValue=dissect("%{aa}biggest key, command: %{cmd} , args: CommandArgs [buffer=%{redisKeyValue}] ,%{bb}").extract(content)?.redisKeyValue;

   if(redisKeyValue!=null){

       emit(redisKeyValue);

    }

}

发表评论 / Comment

用心评论~