Using search in Cortex
Cortex has two options for searching:
- The search bar at the top of any catalog
- This search uses Lucene for the search index. See the available operators below.
- The global search
- The global search allows you to conduct a quick search from anywhere in Cortex, and it searches across names, descriptions, and tags.
Using the catalog search bar
When you need to find a specific entity in Cortex, use the search bar at the top of any catalog.
Enter text into the search bar to perform a basic search, or use operators to refine your search.
Searches prepend and append a wildcard to your search. For example, searching for "search doc" would be translated into *search doc*
under the hood.
Search index and operators
Cortex uses Lucene for the search index, so queries must follow Lucene syntax.
If you search for a term that includes Lucene syntax characters, such as :
, try wrapping your search term in double quotes.
Below is a chart of Cortex's search index and available operators. The search fields are listed in order of weight, with title
, tag
and CID
carrying the most weight and repo basepath
, links
, and custom data
carrying the least weight.
Search field | Corresponding YAML field | Explanation | Examples (based on sample YAMLs below) |
---|---|---|---|
Title ( title: or name: ) | title | Searches for the entity's name as defined in the title field. | |
Tag ( tag: ) | x-cortex-tag | Searches for an entity tag as defined in the x-cortex-tag field. If an entity tag has more than one term separated by a hyphen, you can search for the tag using hyphens or spaces. At least one of these (or a wildcard) must be used for results to be generated. | |
CID ( cid: ) | (depends on integration) | Searches for an ID associated with an entity. This usually comes from a third-party integration. | |
Description ( description: ) | description | Searches for the supplied term(s) in an entity's description. | |
Group ( group: ) | x-cortex-groups | Searches for entity group names. | |
Owner ( owner: ) | x-cortex-owners | Searches for the owner(s) of an entity. If the owner is a team, Cortex searches team names and team members' names and email addresses. If the owner is an individual, Cortex searches for the user email. | |
Member ( member: ) | x-cortex-team , members | Searches for the name and email address for a team member. This query only returns Team entities. | |
Slack channel ( slack: ) | x-cortex-slack | Searches for a Slack channel name defined in the x-cortex-slack field. | |
Microsoft Teams channel ( microsoft-team: ) | x-cortex-microsoft-teams | Searches for a Microsoft Teams channel name defined in the x-cortex-microsoft-teams field. | |
Repository ( repo: or repository: ) | x-cortex-git , repository | Searches for a Git repository name. | |
Repo basepath ( repo-basepath: or repository-basepath: ) | x-cortex-git , basepath | Searches for a Git repo basepath name. | |
Link ( link: ) | x-cortex-link | Searches for link based on name and URL defined under x-cortex-link . | |
Custom data ( custom-data: ) | x-cortex-custom-metadata | Searches for custom data imported from APIs, third-party integrations, and/or defined in the x-cortex-metadata block. | |
AWS account ID ( aws-account-id: ) | Defined in AWS, not in an entity's YAML | Searches for the AWS account ID of an entity. | |
AWS account name ( aws-account-name: ) | Defined in AWS, not in an entity's YAML | Searches for entities with an AWS account name. | |
AWS region ( aws-region: ) | Defined in AWS, not in an entity's YAML | Searches for entities in an AWS region. | |
AWS ARN ( aws-arn: ) | Defined in AWS, not in an entity's YAML | Searches for an Amazon Resource Name (ARN). | |
AWS entity type ( aws-type: ) | Defined in AWS, not in an entity's YAML | Searches for entities of a given AWS entity type. | |
AWS entity name ( aws-name: ) | Defined in AWS, not in an entity's YAML | Searches for an AWS entity name. | |
AWS primary identifier ( aws-identifier: ) | Defined in AWS, not in an entity's YAML | Searches for an AWS primary identifier. | |
AWS secondary identifier ( aws-secondary-identifier: ) | Defined in AWS, not in an entity's YAML | Searches for an AWS secondary identifier. |
Example YAML files
The YAML files below show what an entity might look like based on the examples in the table above:
Search doc entity YAML
info:
title: Search doc
description: Example entity for an article about using search in Cortex.
x-cortex-tag: search-doc
x-cortex-type: service
x-cortex-groups:
- writing-project
- docs
x-cortex-git:
github:
repository: cortex/docs
basepath: myEntity
x-cortex-link:
- url: https://docs.cortex.io/
name: Live docs
type: DOCUMENTATION
x-cortex-owners:
- name: technical-writers
type: GROUP
provider: CORTEX
- type: EMAIL
email: sample.user@fake.com
x-cortex-oncall:
pagerduty:
id: ASDF1234
type: SERVICE
x-cortex-slack:
channels:
- name: frontal-lobe
notificationsEnabled: true
- name: left-brain
notificationsEnabled: true
x-cortex-microsoft-teams:
channels:
- name: team-docs
teamName: documentation
description: This is a description for the docs channel in Teams.
notificationsEnabled: true
x-cortex-metadata:
regions-of-brain: cerebrum, cerebellum
Technical writers team YAML
info:
title: Technical writers
description: Example Team behind the article about using search in Cortex.
x-cortex-type: team
x-cortex-tag: technical-writers
x-cortex-team:
groups:
- name: cortex/technical-writers
provider: GITHUB
members:
- name: Additional User
email: additional.user@example.com
notificationsEnabled: true
An entity's title, tag, and ID have carry the greatest weight in a search.
Search AWS details
There are additional keys available to search Amazon Web Services (AWS) details in Cortex. See Searching AWS entities in Cortex for more information.
Using global search in Cortex
You can search the Cortex platform from any page using the global search function. Global search pulls from names, descriptions, and tags.
Click the magnifying glass at the bottom of the main nav or use the keyboard shortcut cmd
+k
to open the global search modal:
The search modal displays a list of recommended entities and Scorecards - you can click any of these to go to its details page.
Enter a search term in the search bar to pull up 10 entities or Scorecards that have the search term in their name. This can be a good way to quickly access a specific entity when you're not in the catalogs.
You can also use the Search in
buttons to enter the term directly into the search bar on the All entities, All Initiatives, or All Scorecards pages.