mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-06-28 21:49:40 +02:00
feat: enhance Elasticsearch connector to handle missing index configuration
This commit is contained in:
parent
c3d249682f
commit
72e8d98f40
3 changed files with 12 additions and 14 deletions
|
|
@ -150,10 +150,10 @@ export default function ElasticsearchConnectorPage() {
|
|||
config.ELASTICSEARCH_API_KEY = values.ELASTICSEARCH_API_KEY;
|
||||
}
|
||||
|
||||
if (values.indices?.trim()) {
|
||||
const indicesArr = stringToArray(values.indices);
|
||||
config.ELASTICSEARCH_INDEX = indicesArr.length === 1 ? indicesArr[0] : indicesArr;
|
||||
}
|
||||
const indicesInput = values.indices?.trim() ?? "";
|
||||
const indicesArr = stringToArray(indicesInput);
|
||||
config.ELASTICSEARCH_INDEX =
|
||||
indicesArr.length === 0 ? "*" : indicesArr.length === 1 ? indicesArr[0] : indicesArr;
|
||||
|
||||
if (values.query && values.query !== "*") {
|
||||
config.ELASTICSEARCH_QUERY = values.query;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue