Skip to content

Commit f59d8d3

Browse files
authored
Merge pull request #480 from performant-software/feature/cdp142_multisearch
CDP #142 - Multisearch
2 parents fcdb83b + a902a5b commit f59d8d3

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

packages/core-data/src/utils/Peripleo.js

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,15 @@ const filterLayers = (config: RuntimeConfig) => {
2727
const normalize = (config: RuntimeConfig) => ({
2828
...config,
2929
layers: config.layers || [],
30-
typesense: {
31-
...config.typesense,
32-
host: config.typesense.host || '443',
33-
protocol: config.typesense.protocol || 'https',
34-
sort_by: `_text_match:desc${config.typesense.default_sort ? `,${config.typesense.default_sort}:asc` : ''}`
35-
},
30+
search: _.map(config.search, (search) => ({
31+
...search,
32+
typesense: {
33+
...search.typesense,
34+
host: search.typesense.host || '443',
35+
protocol: search.typesense.protocol || 'https',
36+
sort_by: `_text_match:desc${search.typesense.default_sort ? `,${search.typesense.default_sort}:asc` : ''}`
37+
}
38+
})),
3639
core_data: {
3740
...config.core_data,
3841

packages/core-data/src/utils/Typesense.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,9 @@ const createTypesenseAdapter = (config: TypesenseConfig, options = {}) => (
101101
protocol: config.protocol || 'https'
102102
}
103103
],
104-
cacheSearchResultsForSeconds: 120
104+
cacheSearchResultsForSeconds: 120,
105+
connectionTimeoutSeconds: config.connection_timeout,
106+
timeoutSeconds: config.timeout
105107
},
106108
geoLocationField: 'coordinates',
107109
additionalSearchParameters: {

0 commit comments

Comments
 (0)