Skip to content

Commit 00b1594

Browse files
committed
Config builder fixes
1 parent 1361dea commit 00b1594

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/config/FairDOConfigBuilder.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,7 @@ export class FairDOConfigBuilder {
6363
index_names.push(index.name)
6464

6565
allSearchFields = (index.searchFields || []).reduce((acc, n) => {
66-
if (n === "locationPreview/Sample") {
67-
acc[n] = {
68-
weight: 10
69-
}
70-
} else {
71-
acc[n] = {}
72-
}
66+
acc[n] = {}
7367

7468
return acc
7569
}, allSearchFields)
@@ -113,18 +107,21 @@ export class FairDOConfigBuilder {
113107
if ("type" in n && n.type === "numeric") {
114108
const facetRanges = this.buildNumericRangeFacet(n)
115109
acc[n.key] = {
110+
...n,
116111
type: "range",
117112
ranges: facetRanges
118113
}
119114
} else if ("type" in n && n.type?.startsWith("date_")) {
120115
const facetRanges = this.buildDateRangeFacet(n)
121116
acc[n.key] = {
117+
...n,
122118
type: "range",
123119
ranges: facetRanges
124120
}
125121
} else {
126122
// no specific range facet, use default arguments
127123
acc[n.key] = {
124+
...n,
128125
type: "value",
129126
size: 100
130127
}

0 commit comments

Comments
 (0)