Yes POS,POS1,POS2 are realdata some customer kept computer name like this.
Sql query
select * from assetData where machinename like '%POS%' and installedPrograms like '%Google chrome%';
But in ElasticSearch data stores differently
in output 221 is field name for machine
185 is fieldname for installed programs. One computer will have a muttiple progarm installed.
{
"took":59,
"timed_out":false,
"_shards":{
"total":5,
"successful":5,
"skipped":0,
"failed":0
},
"hits":{
"total":1,
"max_score":0.5753642,
"hits":[
{
"_index":"assetdatalatest_1",
"_type":"post",
"_id":"36",
"_score":0.5753642,
"_source":{
"221":{
"221_1":"POS1"
},
"357":{
"357_1":"JSFBTESTWindows__201800020"
},
"185":{
"185_20":"Windows 10 Update Assistant",
"185_9":"Microsoft Visual C++ 2013 x64 Minimum Runtime - 12.0.21005",
"185_5":"Update for Windows 10 for x64-based Systems (KB4023057)",
"185_6":"Windows Setup Remediations (x64) (KB4023057)",
"185_7":"Microsoft Visual C++ 2008 Redistributable - x64 9.0.30729.6161",
"185_8":"Microsoft Visual C++ 2013 x64 Additional Runtime - 12.0.21005",
"185_1":"Rocket.Chat+ 2.10.5",
"185_2":"HeidiSQL",
"185_3":"SelfHeal Client",
"185_4":"Maxx Audio Installer (x64)",
"185_18":"Google Update Helper",
"185_19":"Microsoft Visual C++ 2008 Redistributable - x86 9.0.30729.6161",
"185_14":"Microsoft Visual C++ 2013 Redistributable (x64) - 12.0.30501",
"185_15":"Microsoft Visual C++ 2013 x86 Minimum Runtime - 12.0.21005",
"185_16":"osrss",
"185_17":"Realtek Audio COM Components",
"185_10":"VMware Workstation",
"185_21":"Intel(R) Processor Graphics",
"185_22":"Realtek High Definition Audio Driver",
"185_11":"UpdateAssistant",
"185_23":"Microsoft Visual C++ 2013 Redistributable (x86) - 12.0.30501",
"185_12":"Google Chrome",
"185_24":"Microsoft Visual C++ 2013 x86 Additional Runtime - 12.0.21005",
"185_13":"Notepad++"
}
}
}
]
}
}
Am trying query to fetch machine name in
{
"query":{
"bool":{
"must":[
{
"multi_match":{
"query":"POS",
"fields":[
"221.221_*"
],
"minimum_should_match":"25%"
}
}
]
}
}
}