我有这个Elasticsearch NEST查询:
var res = elastic.Search<SegmentRecord>(s => s.Index(esIndex).Aggregations(a => a.Terms("agg", x => x.Field(o => o.InstrumentName).Aggregations(a1 => a1.Terms("agg2", f => f.Field(y => y.GroupId))))));
如何循环浏览所有InstrumentName
字段,并为每个字段循环浏览所有GroupId
字段?
答案 0 :(得分:4)
On Nest 5.4.0
<script type="text/javascript">
var table;
$(document).ready(function() {
//datatables
table = $('#table').DataTable({
"scrollX": true,
"processing": true, //Feature control the processing indicator.
"language": {
"processing": '<div class="loading"><div class="content">\n\
<img src="<?php echo base_url().'assets/images/loading/loading.gif'; ?>"/>\n\
</div></div>'
},
"serverSide": true, //Feature control DataTables' server-side processing mode.
"order": [], //Initial no order.
// Load data for the table's content from an Ajax source
"ajax": {
"url": "<?php echo site_url('CTRL/ajax')?>",
"type": "POST",
"data": function(d){
d.agent_code = "agent1";
}
},
//Set column definition initialisation properties.
"columnDefs": [
{
"targets": [ 0 ], //first column / numbering column
"orderable": false, //set not orderable
},
]
});
});
</script>