Fix lucene not allowed characters
This commit is contained in:
parent
4cfcae415e
commit
f7ebf7f8a4
|
@ -34,11 +34,7 @@
|
||||||
{:else if type === "boolean"}
|
{:else if type === "boolean"}
|
||||||
<Toggle text={label} bind:value data-cy="{meta.name}-input" />
|
<Toggle text={label} bind:value data-cy="{meta.name}-input" />
|
||||||
{:else if type === "array"}
|
{:else if type === "array"}
|
||||||
<Multiselect
|
<Multiselect bind:value {label} options={meta.constraints.inclusion.flat()} />
|
||||||
bind:value
|
|
||||||
{label}
|
|
||||||
options={meta.constraints.inclusion.reduce((p, n) => p.concat(n), [])}
|
|
||||||
/>
|
|
||||||
{:else if type === "link"}
|
{:else if type === "link"}
|
||||||
<LinkedRowSelector bind:linkedRows={value} schema={meta} />
|
<LinkedRowSelector bind:linkedRows={value} schema={meta} />
|
||||||
{:else if type === "longform"}
|
{:else if type === "longform"}
|
||||||
|
|
|
@ -62,7 +62,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
// if changed to an array, change default value to empty array
|
// if changed to an array, change default value to empty array
|
||||||
const idx = filters.findIndex(x => (x.field = field))
|
const idx = filters.findIndex(x => x.field === field)
|
||||||
if (expression.type === "array") {
|
if (expression.type === "array") {
|
||||||
filters[idx].value = []
|
filters[idx].value = []
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -133,7 +133,7 @@ class QueryBuilder {
|
||||||
}
|
}
|
||||||
// Escape characters
|
// Escape characters
|
||||||
if (escape && originalType === "string") {
|
if (escape && originalType === "string") {
|
||||||
value = `${value}`.replace(/[ #+\-&|!{}\]^"~*?:\\]/g, "\\$&")
|
value = `${value}`.replace(/[ #+\-&|!(){}\]^"~*?:\\]/g, "\\$&")
|
||||||
}
|
}
|
||||||
// Wrap in quotes
|
// Wrap in quotes
|
||||||
if (hasVersion && wrap) {
|
if (hasVersion && wrap) {
|
||||||
|
|
Loading…
Reference in New Issue