Skip to content

Commit

Permalink
rename regex to substring search
Browse files Browse the repository at this point in the history
  • Loading branch information
fhennig committed Oct 23, 2024
1 parent 5e124a8 commit a544419
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions kubernetes/loculus/templates/_common-metadata.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ fields:
displayName: Submission ID
type: string
header: Submission details
enableRegex: true
enableSubstringSearch: true
- name: isRevocation
type: boolean
notSearchable: true
Expand Down Expand Up @@ -186,8 +186,8 @@ organisms:
{{- if .autocomplete }}
autocomplete: {{ .autocomplete }}
{{- end }}
{{- if .enableRegex }}
regexSearch: {{ .enableRegex }}
{{- if .enableSubstringSearch }}
substringSearch: {{ .enableSubstringSearch }}
{{- end}}
{{- if .notSearchable }}
notSearchable: {{ .notSearchable }}
Expand Down
2 changes: 1 addition & 1 deletion kubernetes/loculus/templates/_siloDatabaseConfig.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{{- if .generateIndex }}
generateIndex: {{ .generateIndex }}
{{- end }}
{{- if .enableRegex }}
{{- if .enableSubstringSearch }}
lapisAllowsRegexSearch: true
{{- end }}
{{- end }}
Expand Down
6 changes: 3 additions & 3 deletions kubernetes/loculus/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -446,19 +446,19 @@ defaultOrganismConfig: &defaultOrganismConfig
displayName: Isolate name
header: Sample details
ingest: ncbiIsolateName
enableRegex: true
enableSubstringSearch: true
- name: authors
displayName: Authors
type: authors
header: Authors
enableRegex: true
enableSubstringSearch: true
truncateColumnDisplayTo: 15
ingest: ncbiSubmitterNames
- name: authorAffiliations
displayName: Author affiliations
generateIndex: true
autocomplete: true
enableRegex: true
enableSubstringSearch: true
truncateColumnDisplayTo: 15
header: Authors
ingest: ncbiSubmitterAffiliation
Expand Down
2 changes: 1 addition & 1 deletion website/src/types/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const metadata = z.object({
hideOnSequenceDetailsPage: z.boolean().optional(),
header: z.string().optional(),
rangeSearch: z.boolean().optional(),
regexSearch: z.boolean().optional(),
substringSearch: z.boolean().optional(),
});

export const inputField = z.object({
Expand Down
2 changes: 1 addition & 1 deletion website/src/utils/search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ export const getLapisSearchParameters = (
Object.entries(fieldValues).filter(([, value]) => value !== undefined && value !== ''),
);
for (const field of expandedSchema) {
if (field.regexSearch === true && sequenceFilters[field.name] !== undefined) {
if (field.substringSearch === true && sequenceFilters[field.name] !== undefined) {
sequenceFilters[field.name.concat('.regex')] = makeCaseInsensitiveLiteralSubstringRegex(
sequenceFilters[field.name],
);
Expand Down

0 comments on commit a544419

Please sign in to comment.