@eeacms/volto-datahub 0.1.9 → 0.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -4,7 +4,17 @@ All notable changes to this project will be documented in this file. Dates are d
|
|
|
4
4
|
|
|
5
5
|
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
6
6
|
|
|
7
|
-
### [0.1.
|
|
7
|
+
### [0.1.10](https://github.com/eea/volto-datahub/compare/0.1.9...0.1.10) - 21 September 2022
|
|
8
|
+
|
|
9
|
+
#### :hammer_and_wrench: Others
|
|
10
|
+
|
|
11
|
+
- Update dependencies [kreafox - [`e9fc8c3`](https://github.com/eea/volto-datahub/commit/e9fc8c35530214b19e969d1e5d9b88ffe9098c4d)]
|
|
12
|
+
- Use tabs on the landing page [kreafox - [`d0f4b91`](https://github.com/eea/volto-datahub/commit/d0f4b910d414f5cbad58d9b8eaa7090b1aa3b7dd)]
|
|
13
|
+
- Fix card model [Tiberiu Ichim - [`3d98969`](https://github.com/eea/volto-datahub/commit/3d98969ce9339c6aa6126cb5bbe7ad630ab74faf)]
|
|
14
|
+
- WIP integrate UniversalItem [kreafox - [`02e37f4`](https://github.com/eea/volto-datahub/commit/02e37f43fe580982acba5ae731f77a6724ec13fe)]
|
|
15
|
+
- WIP use universalItem [Tiberiu Ichim - [`024313e`](https://github.com/eea/volto-datahub/commit/024313e1d43135ae4f9c170d19065eea23fa7138)]
|
|
16
|
+
- Code cleanup in datahub item [Tiberiu Ichim - [`3856914`](https://github.com/eea/volto-datahub/commit/3856914da9b2759bb8c9bdf5af233d2eb6bfd9b3)]
|
|
17
|
+
### [0.1.9](https://github.com/eea/volto-datahub/compare/0.1.8...0.1.9) - 16 September 2022
|
|
8
18
|
|
|
9
19
|
#### :hammer_and_wrench: Others
|
|
10
20
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eeacms/volto-datahub",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.10",
|
|
4
4
|
"description": "@eeacms/volto-datahub: Volto add-on",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"author": "European Environment Agency: IDM2 A-Team",
|
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
"url": "git@github.com:eea/volto-datahub.git"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@eeacms/volto-globalsearch": "*"
|
|
20
|
+
"@eeacms/volto-globalsearch": "*",
|
|
21
|
+
"@eeacms/volto-listing-block": "*"
|
|
21
22
|
},
|
|
22
23
|
"devDependencies": {
|
|
23
24
|
"@plone/scripts": "*",
|
|
@@ -25,7 +26,8 @@
|
|
|
25
26
|
"babel-plugin-transform-class-properties": "^6.24.1"
|
|
26
27
|
},
|
|
27
28
|
"addons": [
|
|
28
|
-
"@eeacms/volto-globalsearch"
|
|
29
|
+
"@eeacms/volto-globalsearch",
|
|
30
|
+
"@eeacms/volto-listing-block"
|
|
29
31
|
],
|
|
30
32
|
"scripts": {
|
|
31
33
|
"release": "release-it",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { Tab, Card, Menu } from 'semantic-ui-react';
|
|
4
4
|
import useDeepCompareEffect from 'use-deep-compare-effect';
|
|
5
5
|
import { useAtom } from 'jotai';
|
|
6
6
|
|
|
@@ -151,79 +151,96 @@ const LandingPage = (props) => {
|
|
|
151
151
|
sections,
|
|
152
152
|
]);
|
|
153
153
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
154
|
+
const panes = sections
|
|
155
|
+
.filter((section) => !section.hidden)
|
|
156
|
+
.map((section, index) => {
|
|
157
|
+
const tabIndex = index + 1;
|
|
158
158
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
toggle
|
|
159
|
+
return {
|
|
160
|
+
id: section,
|
|
161
|
+
menuItem: {
|
|
162
|
+
children: () => {
|
|
163
|
+
return (
|
|
164
|
+
<React.Fragment key={`tab-${tabIndex}`}>
|
|
165
|
+
<Menu.Item
|
|
167
166
|
active={activeSection === section.facetField}
|
|
168
|
-
className="ui button"
|
|
169
167
|
onClick={() => setActiveSection(section.facetField)}
|
|
170
168
|
>
|
|
171
169
|
{section.title}
|
|
172
|
-
</
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
170
|
+
</Menu.Item>
|
|
171
|
+
</React.Fragment>
|
|
172
|
+
);
|
|
173
|
+
},
|
|
174
|
+
},
|
|
175
|
+
render: () => {
|
|
176
|
+
return (
|
|
177
|
+
<Tab.Pane>
|
|
178
|
+
<div className="landing-page-cards">
|
|
179
|
+
<Card.Group itemsPerRow={5}>
|
|
180
|
+
{sortedTiles(tiles, activeSectionConfig, appConfig).map(
|
|
181
|
+
(topic, index) => {
|
|
182
|
+
const onClickHandler = () => {
|
|
183
|
+
setFilter(
|
|
184
|
+
activeSection,
|
|
185
|
+
topic.value,
|
|
186
|
+
activeSectionConfig.filterType || 'any',
|
|
187
|
+
);
|
|
185
188
|
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
189
|
+
// apply configured default values
|
|
190
|
+
appConfig.facets
|
|
191
|
+
.filter((f) => f.field !== activeSection && f.default)
|
|
192
|
+
.forEach((facet) => {
|
|
193
|
+
facet.default.values.forEach((value) =>
|
|
194
|
+
setFilter(
|
|
195
|
+
facet.field,
|
|
196
|
+
value,
|
|
197
|
+
facet.default.type || 'any',
|
|
198
|
+
),
|
|
199
|
+
);
|
|
200
|
+
});
|
|
201
|
+
setSort(sortField, sortDirection);
|
|
202
|
+
setShowFacets(true);
|
|
203
|
+
};
|
|
201
204
|
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
205
|
+
return (
|
|
206
|
+
<Card onClick={onClickHandler} key={index}>
|
|
207
|
+
<Card.Content>
|
|
208
|
+
<Card.Header>
|
|
209
|
+
{icon ? (
|
|
210
|
+
<Icon {...icon} type={topic.value} />
|
|
211
|
+
) : (
|
|
212
|
+
''
|
|
213
|
+
)}
|
|
214
|
+
<Term term={topic.value} field={activeSection} />
|
|
215
|
+
</Card.Header>
|
|
216
|
+
</Card.Content>
|
|
217
|
+
<Card.Content extra>
|
|
218
|
+
<span className="count">
|
|
219
|
+
{topic.count}{' '}
|
|
220
|
+
{topic.count === 1 ? 'item' : 'items'}
|
|
221
|
+
</span>
|
|
222
|
+
</Card.Content>
|
|
223
|
+
</Card>
|
|
224
|
+
);
|
|
225
|
+
},
|
|
226
|
+
)}
|
|
227
|
+
</Card.Group>
|
|
228
|
+
</div>
|
|
229
|
+
</Tab.Pane>
|
|
230
|
+
);
|
|
231
|
+
},
|
|
232
|
+
};
|
|
233
|
+
});
|
|
234
|
+
|
|
235
|
+
return (
|
|
236
|
+
<div className="landing-page-container">
|
|
237
|
+
<div className="landing-page">
|
|
238
|
+
<h4 className="browse-by">Browse by</h4>
|
|
239
|
+
<Tab
|
|
240
|
+
className="search-tab"
|
|
241
|
+
menu={{ secondary: true, pointing: true }}
|
|
242
|
+
panes={panes}
|
|
243
|
+
/>
|
|
227
244
|
{hasOverflow ? (
|
|
228
245
|
<div className="info">
|
|
229
246
|
<p>Only first {maxPerSection} items are displayed.</p>
|
|
@@ -1,194 +1,142 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
Label,
|
|
5
|
-
// Button,
|
|
6
|
-
// Dropdown
|
|
7
|
-
} from 'semantic-ui-react';
|
|
2
|
+
|
|
8
3
|
import { DateTime, StringList } from '@eeacms/search';
|
|
9
|
-
|
|
10
|
-
// import { useAppConfig, useWindowDimensions } from '@eeacms/search/lib/hocs';
|
|
11
|
-
// import { TagsList } from '@eeacms/search/components'; // SegmentedBreadcrumb,
|
|
12
|
-
// import { firstWords, getTermDisplayValue } from '@eeacms/search/lib/utils';
|
|
13
|
-
// import MoreLikeThisTrigger from '@eeacms/search/components/Result/MoreLikeThisTrigger';
|
|
14
|
-
// import ExternalLink from '@eeacms/search/components/Result/ExternalLink';
|
|
15
|
-
// import ResultContext from '@eeacms/search/components/Result/ResultContext';
|
|
16
|
-
// import ContentClusters from '@eeacms/search/components/Result/ContentClusters';
|
|
17
|
-
import {
|
|
18
|
-
useAppConfig,
|
|
19
|
-
ResultContext,
|
|
20
|
-
firstWords,
|
|
21
|
-
// ContentClusters,
|
|
22
|
-
// useWindowDimensions,
|
|
23
|
-
// MoreLikeThisTrigger,
|
|
24
|
-
// TagsList,
|
|
25
|
-
// ExternalLink,
|
|
26
|
-
// getTermDisplayValue,
|
|
27
|
-
} from '@eeacms/search';
|
|
4
|
+
import { ResultContext } from '@eeacms/search';
|
|
28
5
|
import { Link } from 'react-router-dom';
|
|
6
|
+
import { UniversalItem } from '@eeacms/volto-listing-block';
|
|
29
7
|
|
|
30
8
|
const DatahubCardItem = (props) => {
|
|
31
|
-
const {
|
|
32
|
-
result,
|
|
33
|
-
// showControls = true
|
|
34
|
-
} = props;
|
|
35
|
-
const { appConfig } = useAppConfig();
|
|
36
|
-
const {
|
|
37
|
-
// vocab = {},
|
|
38
|
-
debugQuery,
|
|
39
|
-
} = appConfig;
|
|
9
|
+
const { result } = props;
|
|
40
10
|
const { topic } = result._result || [];
|
|
41
|
-
const [hovered, setHovered] = React.useState(false);
|
|
42
|
-
|
|
43
|
-
// const { pathname, search } = useLocation();
|
|
44
11
|
|
|
45
|
-
let metaType = result.metaTypes || '';
|
|
46
|
-
if (metaType.length === 0) {
|
|
47
|
-
|
|
48
|
-
}
|
|
12
|
+
// let metaType = result.metaTypes || '';
|
|
13
|
+
// if (metaType.length === 0) {
|
|
14
|
+
// metaType = 'Others';
|
|
15
|
+
// }
|
|
49
16
|
|
|
50
|
-
const classColLeft = result.hasImage ? 'col-left' : 'col-left no-image';
|
|
51
17
|
const [resultId] = (result.href || '').split('/').reverse();
|
|
52
18
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
19
|
+
const item = {
|
|
20
|
+
title: (
|
|
21
|
+
<Link
|
|
22
|
+
to={{
|
|
23
|
+
pathname: `/en/datahub/datahubitem-view/${resultId}`,
|
|
24
|
+
state: {
|
|
25
|
+
fromPathname: window.location.pathname,
|
|
26
|
+
fromSearch: window.location.search,
|
|
27
|
+
},
|
|
28
|
+
}}
|
|
29
|
+
title={result.title}
|
|
30
|
+
>
|
|
31
|
+
{result.title}
|
|
32
|
+
</Link>
|
|
33
|
+
),
|
|
34
|
+
description: <ResultContext {...props} />,
|
|
35
|
+
preview_image_url: result.hasImage ? result.thumbUrl : undefined,
|
|
36
|
+
extra: (
|
|
37
|
+
<div className="result-bottom">
|
|
38
|
+
<div className="result-info">
|
|
39
|
+
<span className="result-info-title">Published: </span>
|
|
40
|
+
<DateTime format="DATE_MED" value={result.issued} />
|
|
41
|
+
</div>
|
|
42
|
+
{topic ? (
|
|
43
|
+
<div className="result-info">
|
|
44
|
+
<span className="result-info-title">Topics: </span>
|
|
45
|
+
<StringList value={topic.raw} />
|
|
69
46
|
</div>
|
|
47
|
+
) : null}
|
|
48
|
+
<div className="result-info">
|
|
49
|
+
<span className="result-info-title">Available formats: </span>
|
|
50
|
+
[Icons]
|
|
70
51
|
</div>
|
|
71
|
-
</div
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
{/* <div className="result-info">
|
|
75
|
-
<span className="result-info-title">Author: </span>
|
|
76
|
-
{result._result?.raw_value?.raw.Org}
|
|
77
|
-
</div> */}
|
|
78
|
-
<h3>
|
|
79
|
-
<Link
|
|
80
|
-
to={{
|
|
81
|
-
pathname: `/en/datahub/datahubitem-view/${resultId}`,
|
|
82
|
-
state: {
|
|
83
|
-
fromPathname: window.location.pathname,
|
|
84
|
-
fromSearch: window.location.search,
|
|
85
|
-
},
|
|
86
|
-
}}
|
|
87
|
-
title={result.title}
|
|
88
|
-
>
|
|
89
|
-
{firstWords(result.title, 12)}
|
|
90
|
-
</Link>
|
|
91
|
-
{result.isNew && (
|
|
92
|
-
<Label className="new-item" horizontal>
|
|
93
|
-
New
|
|
94
|
-
</Label>
|
|
95
|
-
)}
|
|
96
|
-
{result.isExpired && (
|
|
97
|
-
<Label className="archived-item" horizontal>
|
|
98
|
-
Archived
|
|
99
|
-
</Label>
|
|
100
|
-
)}
|
|
101
|
-
</h3>
|
|
102
|
-
{/* <SegmentedBreadcrumb */}
|
|
103
|
-
{/* href={result.href} */}
|
|
104
|
-
{/* short={true} */}
|
|
105
|
-
{/* maxChars={40} */}
|
|
106
|
-
{/* /> */}
|
|
52
|
+
</div>
|
|
53
|
+
),
|
|
54
|
+
};
|
|
107
55
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
getTermDisplayValue({
|
|
114
|
-
vocab,
|
|
115
|
-
field: 'cluster_name',
|
|
116
|
-
term: result.source,
|
|
117
|
-
}),
|
|
118
|
-
8,
|
|
119
|
-
)}
|
|
120
|
-
</strong>
|
|
121
|
-
</Link>
|
|
56
|
+
const itemModel = {
|
|
57
|
+
hasImage: result.hasImage,
|
|
58
|
+
hasDescription: true,
|
|
59
|
+
'@type': 'searchItem',
|
|
60
|
+
};
|
|
122
61
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
view={Button}
|
|
126
|
-
className="mlt"
|
|
127
|
-
compact
|
|
128
|
-
color="green"
|
|
129
|
-
size="mini"
|
|
130
|
-
result={result}
|
|
131
|
-
>
|
|
132
|
-
more like this
|
|
133
|
-
</MoreLikeThisTrigger>
|
|
134
|
-
)}
|
|
135
|
-
{showControls && isSmallScreen && (
|
|
136
|
-
<Dropdown icon="ellipsis vertical">
|
|
137
|
-
<Dropdown.Menu className="mlt">
|
|
138
|
-
<MoreLikeThisTrigger result={result} view={Dropdown.Item}>
|
|
139
|
-
More like this
|
|
140
|
-
</MoreLikeThisTrigger>
|
|
141
|
-
</Dropdown.Menu>
|
|
142
|
-
</Dropdown>
|
|
143
|
-
)}
|
|
144
|
-
</div>*/}
|
|
62
|
+
return <UniversalItem item={item} itemModel={itemModel} />;
|
|
63
|
+
};
|
|
145
64
|
|
|
146
|
-
|
|
65
|
+
// <div
|
|
66
|
+
// className={cx('search-result', { hovered })}
|
|
67
|
+
// onMouseEnter={() => setHovered(true)}
|
|
68
|
+
// onMouseLeave={() => setHovered(false)}
|
|
69
|
+
// >
|
|
70
|
+
// <div className={classColLeft}>
|
|
71
|
+
// <div className="details">
|
|
72
|
+
// <h3>
|
|
73
|
+
// <Link
|
|
74
|
+
// to={{
|
|
75
|
+
// pathname: `/en/datahub/datahubitem-view/${resultId}`,
|
|
76
|
+
// state: {
|
|
77
|
+
// fromPathname: window.location.pathname,
|
|
78
|
+
// fromSearch: window.location.search,
|
|
79
|
+
// },
|
|
80
|
+
// }}
|
|
81
|
+
// title={result.title}
|
|
82
|
+
// >
|
|
83
|
+
// {firstWords(result.title, 12)}
|
|
84
|
+
// </Link>
|
|
85
|
+
// {result.isNew && (
|
|
86
|
+
// <Label className="new-item" horizontal>
|
|
87
|
+
// New
|
|
88
|
+
// </Label>
|
|
89
|
+
// )}
|
|
90
|
+
// {result.isExpired && (
|
|
91
|
+
// <Label className="archived-item" horizontal>
|
|
92
|
+
// Archived
|
|
93
|
+
// </Label>
|
|
94
|
+
// )}
|
|
95
|
+
// </h3>
|
|
96
|
+
// {props.children ? props.children : <ResultContext {...props} />}
|
|
147
97
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
);
|
|
192
|
-
};
|
|
98
|
+
// <div className="result-bottom">
|
|
99
|
+
// {topic ? (
|
|
100
|
+
// <div className="result-info">
|
|
101
|
+
// <span className="result-info-title">Topics: </span>
|
|
102
|
+
// <StringList value={topic.raw} />
|
|
103
|
+
// </div>
|
|
104
|
+
// ) : null}
|
|
105
|
+
// <div className="result-info">
|
|
106
|
+
// <span className="result-info-title">Published: </span>
|
|
107
|
+
// <DateTime format="DATE_MED" value={result.issued} />
|
|
108
|
+
// </div>
|
|
109
|
+
// <div className="result-info">
|
|
110
|
+
// <span className="result-info-title">Available formats: </span>
|
|
111
|
+
// [Icons]
|
|
112
|
+
// </div>
|
|
113
|
+
// </div>
|
|
114
|
+
// </div>
|
|
115
|
+
// {debugQuery && (
|
|
116
|
+
// <div>
|
|
117
|
+
// <div>Explanation:</div>
|
|
118
|
+
// <pre>{JSON.stringify(result.explanation, undefined, 2)}</pre>
|
|
119
|
+
// </div>
|
|
120
|
+
// )}
|
|
121
|
+
// </div>
|
|
122
|
+
// {result.hasImage ? (
|
|
123
|
+
// <div className="col-right">
|
|
124
|
+
// <a
|
|
125
|
+
// className={`centered fluid image img-thumbnail`}
|
|
126
|
+
// href={result.href}
|
|
127
|
+
// target="_blank"
|
|
128
|
+
// rel="noreferrer"
|
|
129
|
+
// >
|
|
130
|
+
// <img
|
|
131
|
+
// alt={result.title}
|
|
132
|
+
// src={result.thumbUrl}
|
|
133
|
+
// onError={(e) => {
|
|
134
|
+
// e.target.style.display = 'none';
|
|
135
|
+
// }}
|
|
136
|
+
// />
|
|
137
|
+
// </a>
|
|
138
|
+
// </div>
|
|
139
|
+
// ) : null}
|
|
140
|
+
// </div>
|
|
193
141
|
|
|
194
142
|
export default DatahubCardItem;
|
package/src/config/index.js
CHANGED
|
@@ -14,7 +14,7 @@ const datahubConfig = {
|
|
|
14
14
|
...filters,
|
|
15
15
|
...vocabs,
|
|
16
16
|
|
|
17
|
-
sourceExcludedFields: ['nlp_*', 'event'], // don't need these in results
|
|
17
|
+
sourceExcludedFields: ['nlp_*', 'event', 'raw_value'], // don't need these in results
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
const getClientProxyAddress = () => {
|
package/src/index.js
CHANGED
|
@@ -4,7 +4,6 @@ import DatahubItemView from './components/ItemView/ItemView';
|
|
|
4
4
|
|
|
5
5
|
function tweakForNLPService(body, config) {
|
|
6
6
|
if (!config.enableNLP) {
|
|
7
|
-
body._source = { ...body.source };
|
|
8
7
|
delete body.source;
|
|
9
8
|
delete body.index;
|
|
10
9
|
return body;
|
|
@@ -25,7 +24,7 @@ const applyConfig = (config) => {
|
|
|
25
24
|
// Tweak the searchlib config to use the middleware instead of the index
|
|
26
25
|
datahub.elastic_index = '_es/datahub';
|
|
27
26
|
datahub.index_name = 'data_searchui_datahub';
|
|
28
|
-
datahub.enableNLP =
|
|
27
|
+
datahub.enableNLP = true;
|
|
29
28
|
datahub.showPromptQueries = false;
|
|
30
29
|
datahub.requestBodyModifiers.push(tweakForNLPService);
|
|
31
30
|
datahub.indexBaseUrl = 'https://galliwasp.eea.europa.eu';
|