I have a search statement like this:
{
"size" : 10,
"query" : {
"bool" : {
"must" : [
{
"match" : {
"log._kv_" : {
"query" : "officecheck macros vba_code cmd.exe",
"operator" : "and"
}
}
}
]
}
},
"highlight" : {
"fields" : {
"log._kv_" : {}
}
}
}
I want pick out a log which contain all keywords I mentioned. But I found the result is not what I'm expecting ....Some of the keyword doesn't exists in highlight part in result(cmd not exists in below record) :
"highlight" : {
"log._kv_" : ["additional_info <em>officecheck</em> ole <em>macros</em> <em>vba</em>_<em>code</em> Public Sub Main()\nConst ProcName As String = \"\"\nOn", "additional_info <em>officecheck</em> ole <em>macros</em> subfilename r:\\sav6\\work_channel0_9\\11793486", "additional_info <em>officecheck</em> ole <em>macros</em> <em>vba</em>_filename Module1.bas", "additional_info <em>officecheck</em> ole <em>macros</em> stream_path _VBA_PROJECT_CUR/VBA/Module1" ]
}
So, anyone tell me how can I write a statement to pick out the log only when all keywords exists in a specific field ?