Hi @Christian_Dahlqvist Thank you for your response,
Please find the requested information below
Elasticsearch version
Cluster specs
-
Data nodes: 8 vCPUs, 64 GiB RAM, SSD 2 TB
-
Query/coord nodes: 8 vCPUs, 64 GiB RAM
Observed latency / timeouts
-
Many searches timeout at ~60 seconds
-
It is more likely to timeout when we query at group level (group contains many projects)
-
Queries sometimes work for smaller repos, but most fail for larger scopes
-
We see timeouts even with relatively small result size (top 25)
-
This can happen even with a single query, but is worse under higher request volume (concurrent traffic)
Filters / selectivity
-
We usually apply group-level and/or project-level filters
-
There are many projects, but limited groups
Sample Request:
// slightly modified not the actual request
Summary
{
"searchFilters": {
"projectName": [ "SampleProject" ],
"projectIdentifier": [ "sample-project-id" ],
},
"options": [ "Faceting", "Highlighting" ],
"skipResults": 0,
"takeResults": 50,
"orderBy": [
{ "Field": "eventDate", "SortOrder": "Desc" }
],
"fields": [
"projectIdentifier",
"projectName",
"identifier",
"recordType",
"itemCategory",
"eventId",
"eventTitle",
"eventDescription",
"eventDate",
"authorName",
"authorEmail",
"authorDate",
"performerName",
"performerEmail",
"indexedTimestamp",
"actionDate",
"@timestamptimestamp"
],
"highlightFields": [
"eventTitle",
"eventDescription",
"authorName",
"performerName"
],
"terminateAfter": 0,
"keepAlive": "1m",
"pitId": null,
"continueOnEmptyQuery": false,
"searchAfter": null,
"scopeFiltersExpression": {
"type": "And",
"children": [
{
"type": "Term",
"field": "recordType",
"operator": "Equals",
"value": "sample-record-type"
}
]
},
"queryParseTree": {
"type": "Term",
"field": "eventTitle",
"operator": "Contains",
"value": "test"
}
}
**
Index mapping**
Below is a partial mapping snippet (data stream enabled). Key points:
-
@timestamp, authorDate, eventDate are date (epoch_second)
-
Many searchable fields are text with analyzers
-
Some fields also have keyword subfields (raw) with eager_global_ordinals=true
{
".ds-datastream_XX_8140-bc49432d81a7-2026.01.20-000001": {
"mappings": {
"_meta": {
"version": 8140
},
"_data_stream_timestamp": {
"enabled": true
},
"properties": {
"@timestamp": {
"type": "date",
"format": "epoch_second"
},
"authorDate": {
"type": "date",
"format": "epoch_second"
},
"authorEmail": {
"type": "text",
"fields": {
"raw": {
"type": "keyword",
"eager_global_ordinals": true
}
},
"index_options": "offsets",
"analyzer": "unstemmedFullTextAnalyzer"
},
"authorName": {
"type": "text",
"fields": {
"pattern": {
"type": "text",
"index_options": "offsets",
"analyzer": "contentAnalyzer"
},
"raw": {
"type": "keyword",
"eager_global_ordinals": true
}
},
"norms": false,
"analyzer": "LowerCaseAnalyzer"
},
"entityId": {
"type": "text"
},
"entityName": {
"type": "text",
"fields": {
"raw": {
"type": "keyword"
}
},
"norms": false,
"analyzer": "LowerCaseAnalyzer"
},
"entityNameOriginal": {
"type": "text"
},
"eventDate": {
"type": "date",
"format": "epoch_second"
},
"eventDescription": {
"type": "text",
"index_options": "offsets",
"norms": false,
"analyzer": "contentAnalyzer"
},
"eventId": {
"type": "text"
},
"eventTitle": {
"type": "text",
"index_options": "offsets",
"norms": false,
"analyzer": "contentAnalyzer"
},
"performerEmail": {
"type": "text",
"fields": {
"raw": {
"type": "keyword",
"eager_global_ordinals": true
}
},
"index_options": "offsets",
"analyzer": "unstemmedFullTextAnalyzer"
},
"performerName": {
"type": "text",
"fields": {
"pattern": {
"type": "text",
"index_options": "offsets",
"analyzer": "contentAnalyzer"
},
"raw": {
"type": "keyword",
"eager_global_ordinals": true
}
},
"index_options": "offsets",
"analyzer": "unstemmedFullTextAnalyzer"
},
"recordType": {
"type": "text"
},
"identifier": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"indexedTimestamp": {
"type": "date",
"format": "epoch_second"
},
"itemCategory": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"projectIdentifier": {
"type": "text"
},
"projectName": {
"type": "text",
"fields": {
"raw": {
"type": "keyword",
"eager_global_ordinals": true
}
},
"norms": false,
"analyzer": "LowerCaseAnalyzer"
},
"projectNameOriginal": {
"type": "text"
},
"initiator": {
"type": "text",
"fields": {
"pattern": {
"type": "text",
"index_options": "offsets",
"analyzer": "contentAnalyzer"
},
"raw": {
"type": "keyword",
"eager_global_ordinals": true
}
},
"index_options": "offsets",
"analyzer": "unstemmedFullTextAnalyzer"
},
"actionDate": {
"type": "date",
"format": "epoch_second"
},
"norms": false,
"analyzer": "LowerCaseAnalyzer"
}
}
}
}
}