UnifiedSearch: Introduce a ResourceIndex interface and bleve implementation (#96826)

Co-authored-by: Scott Lepper <scott.lepper@gmail.com>
This commit is contained in:
Ryan McKinley
2024-11-22 16:44:06 +03:00
committed by GitHub
co-authored by Scott Lepper
parent bbae396db4
commit c6848d4b68
20 changed files with 2533 additions and 425 deletions
@@ -0,0 +1,143 @@
{
"metadata": {},
"columnDefinitions": [
{
"name": "_id",
"type": "string",
"format": "",
"description": "Unique Identifier. {namespace}/{group}/{resource}/{name}",
"priority": 0
},
{
"name": "title",
"type": "string",
"format": "",
"description": "Display name for the resource",
"priority": 0
},
{
"name": "tags",
"type": "string",
"format": "",
"description": "Unique tags",
"priority": 0
},
{
"name": "folder",
"type": "string",
"format": "",
"description": "Kubernetes name for the folder",
"priority": 0
},
{
"name": "rv",
"type": "number",
"format": "int64",
"description": "resource version",
"priority": 0
},
{
"name": "created",
"type": "number",
"format": "int64",
"description": "created timestamp",
"priority": 0
},
{
"name": "schema_version",
"type": "number",
"format": "int32",
"description": "Numeric version saying when the schema was saved",
"priority": 0
},
{
"name": "link_count",
"type": "number",
"format": "int32",
"description": "How many links appear on the page",
"priority": 0
},
{
"name": "panel_types",
"type": "string",
"format": "",
"description": "How many links appear on the page",
"priority": 0
}
],
"rows": [
{
"cells": [
"ns/g/dash/ccc",
"ccc (dash)",
[
"aa"
],
"xxx",
3,
0,
null,
null,
null
],
"object": {
"kind": "dash",
"apiVersion": "g",
"metadata": {
"name": "ccc",
"namespace": "ns",
"creationTimestamp": null
}
}
},
{
"cells": [
"ns/g/dash/aaa",
"bbb (dash)",
[
"aa",
"bb"
],
"xxx",
1,
0,
null,
null,
null
],
"object": {
"kind": "dash",
"apiVersion": "g",
"metadata": {
"name": "aaa",
"namespace": "ns",
"creationTimestamp": null
}
}
},
{
"cells": [
"ns/g/dash/bbb",
"aaa (dash)",
[
"aa"
],
"xxx",
2,
0,
null,
null,
null
],
"object": {
"kind": "dash",
"apiVersion": "g",
"metadata": {
"name": "bbb",
"namespace": "ns",
"creationTimestamp": null
}
}
}
]
}
@@ -0,0 +1,96 @@
{
"metadata": {},
"columnDefinitions": [
{
"name": "title",
"type": "string",
"format": "",
"description": "Display name for the resource",
"priority": 0
},
{
"name": "_id",
"type": "string",
"format": "",
"description": "Unique Identifier. {namespace}/{group}/{resource}/{name}",
"priority": 0
}
],
"rows": [
{
"cells": [
"aaa (dash)",
"ns/g/dash/bbb"
],
"object": {
"kind": "dash",
"apiVersion": "g",
"metadata": {
"name": "bbb",
"namespace": "ns",
"creationTimestamp": null
}
}
},
{
"cells": [
"bbb (dash)",
"ns/g/dash/aaa"
],
"object": {
"kind": "dash",
"apiVersion": "g",
"metadata": {
"name": "aaa",
"namespace": "ns",
"creationTimestamp": null
}
}
},
{
"cells": [
"ccc (dash)",
"ns/g/dash/ccc"
],
"object": {
"kind": "dash",
"apiVersion": "g",
"metadata": {
"name": "ccc",
"namespace": "ns",
"creationTimestamp": null
}
}
},
{
"cells": [
"yyy (folder)",
"ns/g/folder/yyy"
],
"object": {
"kind": "folder",
"apiVersion": "g",
"metadata": {
"name": "yyy",
"namespace": "ns",
"creationTimestamp": null
}
}
},
{
"cells": [
"zzz (folder)",
"ns/g/folder/zzz"
],
"object": {
"kind": "folder",
"apiVersion": "g",
"metadata": {
"name": "zzz",
"namespace": "ns",
"creationTimestamp": null
}
}
}
]
}
+87
View File
@@ -0,0 +1,87 @@
{
"metadata": {},
"columnDefinitions": [
{
"name": "_id",
"type": "string",
"format": "",
"description": "Unique Identifier. {namespace}/{group}/{resource}/{name}",
"priority": 0
},
{
"name": "title",
"type": "string",
"format": "",
"description": "Display name for the resource",
"priority": 0
},
{
"name": "tags",
"type": "string",
"format": "",
"description": "Unique tags",
"priority": 0
},
{
"name": "folder",
"type": "string",
"format": "",
"description": "Kubernetes name for the folder",
"priority": 0
},
{
"name": "rv",
"type": "number",
"format": "int64",
"description": "resource version",
"priority": 0
},
{
"name": "created",
"type": "number",
"format": "int64",
"description": "created timestamp",
"priority": 0
}
],
"rows": [
{
"cells": [
"ns/g/folder/yyy",
"yyy (folder)",
null,
null,
2,
0
],
"object": {
"kind": "folder",
"apiVersion": "g",
"metadata": {
"name": "yyy",
"namespace": "ns",
"creationTimestamp": null
}
}
},
{
"cells": [
"ns/g/folder/zzz",
"zzz (folder)",
null,
null,
1,
0
],
"object": {
"kind": "folder",
"apiVersion": "g",
"metadata": {
"name": "zzz",
"namespace": "ns",
"creationTimestamp": null
}
}
}
]
}