search: add legacy id for all resources in bleve (#103206)

* add legacy id for all resources in bleve
This commit is contained in:
Will Assis
2025-04-02 08:20:23 -04:00
committed by GitHub
parent 2afeebec28
commit 08042ae827
13 changed files with 56 additions and 52 deletions
+7 -1
View File
@@ -272,7 +272,8 @@ func (x *searchableDocumentFields) Field(name string) *ResourceTableColumnDefini
}
const SEARCH_FIELD_PREFIX = "fields."
const SEARCH_FIELD_ID = "_id" // {namespace}/{group}/{resource}/{name}
const SEARCH_FIELD_ID = "_id" // {namespace}/{group}/{resource}/{name}
const SEARCH_FIELD_LEGACY_ID = utils.LabelKeyDeprecatedInternalID
const SEARCH_FIELD_KIND = "kind" // resource ( for federated index filtering )
const SEARCH_FIELD_GROUP_RESOURCE = "gr" // group/resource
const SEARCH_FIELD_NAMESPACE = "namespace"
@@ -387,6 +388,11 @@ func StandardSearchFields() SearchableDocumentFields {
Type: ResourceTableColumnDefinition_DOUBLE,
Description: "The search score",
},
{
Name: SEARCH_FIELD_LEGACY_ID,
Type: ResourceTableColumnDefinition_INT64,
Description: "Deprecated legacy id of the resource",
},
})
if err != nil {
panic("failed to initialize standard search fields")