Hi @dadoonet,
Thank you for looking into it
After refresh it seems to give me consistent times of 5ms (but also after elastic restart slow times went from 700-1000ms to 300-500 and became less consistently reproducible)
It is on my development workstation with NVMe SSD. Single node with out of the box config. Not much data (couple of indices under total 1G but documents with hundreds of fields and two levels of nesting. In that index is about 40K of main docs and 1000K nested). I would think default elastic memory allocation is sufficient for this size of the data
{
"query": {
"bool": {
"should": [
{
"bool": {
"must": [
{
"multi_match": {
"query": "bean",
"type": "phrase",
"slop": 5,
"fields": [
"text_search.protectiveOrderIssues.prefix",
"text_search.protectiveOrderIssues^2"
]
}
}
],
"_name": "criteria_root",
"filter": [
{
"term": {
"secondaryDocket": false
}
}
]
}
},
{
"nested": {
"path": "secondaryDockets",
"query": {
"bool": {
"must": [
{
"multi_match": {
"query": "bean",
"type": "phrase",
"slop": 5,
"fields": [
"secondaryDockets.text_search.protectiveOrderIssues.prefix",
"secondaryDockets.text_search.protectiveOrderIssues^2"
]
}
}
]
}
},
"_name": "criteria_secondary_dockets",
"inner_hits": {
"_source": false,
"highlight": {
"number_of_fragments": 0,
"fragment_size": 300,
"encoder": "html",
"require_field_match": true,
"fields": {
"secondaryDockets.text_search.protectiveOrderIssues.prefix": {}
}
}
}
}
}
]
}
},
"highlight": {
"number_of_fragments": 0,
"fragment_size": 300,
"encoder": "html",
"require_field_match": true,
"fields": {
"text_search.protectiveOrderIssues.prefix": {}
}
},
"_source": {
"includes": [
"id",
"epdsAnumber",
"bNumber",
"caseNumber",
"protester",
"primaryAgency",
"status",
"solicitationNumbers",
"secondaryDocket",
"type.abbreviation",
"filedDate",
"dueDate",
"agencyReportDue",
"agencyReportCommentsDue",
"daysToDueDate",
"team",
"assistantGc",
"attorney",
"identifiers",
"secondaryDockets.id",
"secondaryDockets.epdsAnumber",
"secondaryDockets.bNumber",
"secondaryDockets.caseNumber",
"secondaryDockets.protester",
"secondaryDockets.primaryAgency",
"secondaryDockets.status",
"secondaryDockets.solicitationNumbers",
"secondaryDockets.secondaryDocket",
"secondaryDockets.type.abbreviation",
"secondaryDockets.filedDate",
"secondaryDockets.dueDate",
"secondaryDockets.agencyReportDue",
"secondaryDockets.agencyReportCommentsDue",
"secondaryDockets.daysToDueDate",
"secondaryDockets.team",
"secondaryDockets.assistantGc",
"secondaryDockets.attorney",
"secondaryDockets.identifiers"
]
},
"from": 0,
"size": 20,
"sort": [
{
"_score": {
"order": "desc"
}
},
{
"caseNumber.fileNumber": {
"order": "asc",
"missing": "_first"
}
},
{
"caseNumber.caseNumber": {
"order": "asc",
"missing": "_first"
}
},
{
"filedDate": {
"order": "asc",
"missing": "_first"
}
}
]
}