This repository has been archived by the owner on Oct 26, 2022. It is now read-only.
forked from ShellRechargeSolutionsEU/kendo-elasticsearch
-
Notifications
You must be signed in to change notification settings - Fork 4
/
multivalues-join.html
98 lines (87 loc) · 2.98 KB
/
multivalues-join.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<title>Kendo Elasticsearch - demos - Joined multi values</title>
<!--<link rel='stylesheet' href='http://kendo.cdn.telerik.com/2014.1.318/styles/kendo.common.min.css'>-->
<link rel='stylesheet' href='../bower_components/kendo-ui/styles/kendo.common.min.css'>
<!--<link rel='stylesheet' href='http://kendo.cdn.telerik.com/2014.1.318/styles/kendo.default.min.css'>-->
<link rel='stylesheet' href='../bower_components/kendo-ui/styles/kendo.default.min.css'>
</head>
<body>
<h1>Kendo Elasticsearch - demos - Joined multi values</h1>
<div id='grid'></div>
<!--<script src='https://code.jquery.com/jquery-2.1.4.min.js'></script>-->
<script src='../bower_components/jquery/jquery.min.js'></script>
<!--<script src='http://kendo.cdn.telerik.com/2014.1.318/js/kendo.web.min.js'></script>-->
<script src='../bower_components/kendo-ui/src/js/kendo.web.js'></script>
<!--<script src='https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.10.6/moment.min.js'></script>-->
<script src='../bower_components/moment/min/moment.min.js'></script>
<script src='../dist/kendo-elasticsearch.js'></script>
<script>
$(document).ready(function() {
$('#grid').kendoGrid({
// configure the datasource to be an ElasticSearchDataSource
dataSource: new kendo.data.ElasticSearchDataSource({
transport: {
read: {
url: 'http://localhost:9200/kendo-elasticsearch-demo/person/_search/'
}
},
pageSize: 10,
schema: {
model: {
fields: {
firstName: {
type: 'string',
esFilterSubField: 'lowercase',
esName: 'name.firstName'
},
lastName: {
type: 'string',
esFilterSubField: 'lowercase',
esName: 'name.lastName'
},
emails: {
type: 'string',
esFilterSubField: 'lowercase',
esMultiSeparator: '<br/>'
}
}
}
},
}),
// other grid options besides the datasource
sortable: true,
pageable: true,
filterable: {
extra: true,
operators: {
string: {
search: "Search",
eq: "Is equal to",
neq: "Is not equal to",
startswith: "Starts with",
contains: "Contains",
doesnotcontain: "Does not contain",
endswith: "Ends with"
}
}
},
columns: [{
field: 'firstName',
title: 'First name'
}, {
field: 'lastName',
title: 'Last name'
}, {
field: 'emails',
title: 'Emails',
// This is required for HTML formatting to be accepted
encoded: false
}]
});
});
</script>
</body>
</html>