Skip to content

Commit

Permalink
Allow list of keywords in dual visibility setting (#5065)
Browse files Browse the repository at this point in the history
<!-- Describe what has changed in this PR -->
**What changed?**
Allow list of keywords in dual visibility setting

<!-- Tell your future self why have you made these changes -->
**Why?**
Let dual visibility with Elasticsearch work with list of keywords for
backwards compatibility.

<!-- How have you verified this change? Tested locally? Added a unit
test? Checked in staging env? -->
**How did you test it?**


<!-- Assuming the worst case, what can be broken when deploying this
change to production? -->
**Potential risks**
No. Any setting involving standard visibility will work as usual: custom
search attributes are just ignored and not persisted.

<!-- Is this PR a hotfix candidate or require that a notification be
sent to the broader community? (Yes/No) -->
**Is hotfix candidate?**
No.
  • Loading branch information
rodrigozhou committed Nov 3, 2023
1 parent 26114d7 commit 37da275
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions common/persistence/visibility/defs.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,12 +138,6 @@ func AllowListForValidation(storeNames []string) bool {
return false
}

if len(storeNames) > 1 {
// If more than one store is configured then it means that dual visibility is enabled.
// Dual visibility is used for migration to advanced, don't allow list of values because it will be removed soon.
return false
}

switch storeNames[0] {
case mysql.PluginNameV8, postgresql.PluginNameV12, sqlite.PluginName:
// Advanced visibility with SQL DB don't support list of values
Expand Down

0 comments on commit 37da275

Please sign in to comment.