File tree Expand file tree Collapse file tree 1 file changed +25
-1
lines changed
kubernetes/loculus/templates Expand file tree Collapse file tree 1 file changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -256,7 +256,31 @@ organisms:
256256 metadataTemplate:
257257 {{ .metadataTemplate | toYaml | nindent 8}}
258258 {{ end }}
259- {{ .website | toYaml | nindent 6 }}
259+ {{ omit .website " multiFieldSearches" | toYaml | nindent 6 }}
260+ {{- if .website.multiFieldSearches }}
261+ {{- $perSegmentFields := dict }}
262+ {{- range (concat $commonMetadata .metadata ) }}
263+ {{- if .perSegment }}{{- $_ := set $perSegmentFields .name true }}{{- end }}
264+ {{- end }}
265+ {{- $segments := (include " loculus.getNucleotideSegmentNames" $instance .referenceGenomes | fromYaml).segments }}
266+ {{- $isSegmented := gt (len $segments ) 1 }}
267+ multiFieldSearches:
268+ {{- range .website.multiFieldSearches }}
269+ - name: {{ .name }}
270+ displayName: {{ .displayName }}
271+ fields:
272+ {{- range .fields }}
273+ {{- if and $isSegmented (hasKey $perSegmentFields . ) }}
274+ {{- $field := . }}
275+ {{- range $segments }}
276+ - {{ printf " %s _%s " $field . }}
277+ {{- end }}
278+ {{- else }}
279+ - {{ . }}
280+ {{- end }}
281+ {{- end }}
282+ {{- end }}
283+ {{- end }}
260284 {{- end }}
261285 referenceGenomes:
262286 {{ $instance .referenceGenomes | toYaml | nindent 6 }}
You can’t perform that action at this time.
0 commit comments