Skip to content

Commit

Permalink
fix: added test case domain, tags and owners field to search incident…
Browse files Browse the repository at this point in the history
… index (#18380)
  • Loading branch information
TeddyCr authored and harshach committed Nov 3, 2024
1 parent 11b1044 commit 69eb09c
Show file tree
Hide file tree
Showing 4 changed files with 362 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,21 @@ public Object getEntity() {
private void setParentRelationships(Map<String, Object> doc) {
// denormalize the parent relationships for search
EntityReference testCaseReference = testCaseResolutionStatus.getTestCaseReference();
TestCase testCase = Entity.getEntityOrNull(testCaseReference, "testSuite", Include.ALL);
TestCase testCase =
Entity.getEntityOrNull(testCaseReference, "testSuite,domain,tags,owners", Include.ALL);
if (testCase == null) return;
doc.put("testCase", testCase.getEntityReference());
testCase =
new TestCase()
.withId(testCase.getId())
.withName(testCase.getName())
.withFullyQualifiedName(testCase.getFullyQualifiedName())
.withDescription(testCase.getDescription())
.withDisplayName(testCase.getDisplayName())
.withDeleted(testCase.getDeleted())
.withDomain(testCase.getDomain())
.withTags(testCase.getTags())
.withOwners(testCase.getOwners());
doc.put("testCase", testCase);
TestSuite testSuite = Entity.getEntityOrNull(testCase.getTestSuite(), "", Include.ALL);
if (testSuite == null) return;
doc.put("testSuite", testSuite.getEntityReference());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -669,6 +669,122 @@
},
"href": {
"type": "text"
},
"tags": {
"type": "nested",
"properties": {
"tagFQN": {
"type": "keyword"
},
"labelType": {
"type": "keyword"
},
"description": {
"type": "text",
"index_options": "docs"
},
"source": {
"type": "keyword"
},
"state": {
"type": "keyword"
}
}
},
"owners": {
"properties": {
"id": {
"type": "keyword",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 36
}
}
},
"type": {
"type": "keyword"
},
"name": {
"type": "keyword",
"normalizer": "lowercase_normalizer",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"displayName": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"normalizer": "lowercase_normalizer",
"ignore_above": 256
}
}
},
"fullyQualifiedName": {
"type": "text"
},
"description": {
"type": "text"
},
"deleted": {
"type": "boolean"
},
"href": {
"type": "text"
}
}
},
"domain" : {
"properties": {
"id": {
"type": "keyword",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 36
}
}
},
"type": {
"type": "keyword"
},
"name": {
"type": "keyword",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"displayName": {
"type": "keyword",
"fields": {
"keyword": {
"type": "keyword",
"normalizer": "lowercase_normalizer",
"ignore_above": 256
}
}
},
"fullyQualifiedName": {
"type": "keyword"
},
"description": {
"type": "text"
},
"deleted": {
"type": "boolean"
},
"href": {
"type": "text"
}
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,122 @@
},
"href": {
"type": "text"
},
"tags": {
"type": "nested",
"properties": {
"tagFQN": {
"type": "keyword"
},
"labelType": {
"type": "keyword"
},
"description": {
"type": "text",
"index_options": "docs"
},
"source": {
"type": "keyword"
},
"state": {
"type": "keyword"
}
}
},
"owners": {
"properties": {
"id": {
"type": "keyword",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 36
}
}
},
"type": {
"type": "keyword"
},
"name": {
"type": "keyword",
"normalizer": "lowercase_normalizer",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"displayName": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"normalizer": "lowercase_normalizer",
"ignore_above": 256
}
}
},
"fullyQualifiedName": {
"type": "text"
},
"description": {
"type": "text"
},
"deleted": {
"type": "boolean"
},
"href": {
"type": "text"
}
}
},
"domain" : {
"properties": {
"id": {
"type": "keyword",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 36
}
}
},
"type": {
"type": "keyword"
},
"name": {
"type": "keyword",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"displayName": {
"type": "keyword",
"fields": {
"keyword": {
"type": "keyword",
"normalizer": "lowercase_normalizer",
"ignore_above": 256
}
}
},
"fullyQualifiedName": {
"type": "keyword"
},
"description": {
"type": "text"
},
"deleted": {
"type": "boolean"
},
"href": {
"type": "text"
}
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -620,6 +620,122 @@
},
"href": {
"type": "text"
},
"tags": {
"type": "nested",
"properties": {
"tagFQN": {
"type": "keyword"
},
"labelType": {
"type": "keyword"
},
"description": {
"type": "text",
"index_options": "docs"
},
"source": {
"type": "keyword"
},
"state": {
"type": "keyword"
}
}
},
"owners": {
"properties": {
"id": {
"type": "keyword",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 36
}
}
},
"type": {
"type": "keyword"
},
"name": {
"type": "keyword",
"normalizer": "lowercase_normalizer",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"displayName": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"normalizer": "lowercase_normalizer",
"ignore_above": 256
}
}
},
"fullyQualifiedName": {
"type": "text"
},
"description": {
"type": "text"
},
"deleted": {
"type": "boolean"
},
"href": {
"type": "text"
}
}
},
"domain" : {
"properties": {
"id": {
"type": "keyword",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 36
}
}
},
"type": {
"type": "keyword"
},
"name": {
"type": "keyword",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"displayName": {
"type": "keyword",
"fields": {
"keyword": {
"type": "keyword",
"normalizer": "lowercase_normalizer",
"ignore_above": 256
}
}
},
"fullyQualifiedName": {
"type": "keyword"
},
"description": {
"type": "text"
},
"deleted": {
"type": "boolean"
},
"href": {
"type": "text"
}
}
}
}
}
Expand Down

0 comments on commit 69eb09c

Please sign in to comment.