Skip to content

Commit

Permalink
Merge pull request #389 from gkarat/patch-1
Browse files Browse the repository at this point in the history
docs: Update search-index.md
  • Loading branch information
Hyperkid123 authored Jan 25, 2024
2 parents 5ea4152 + 1ac99b9 commit 912461f
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions docs/search-index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,27 @@ The search index has two sources:

### Entry is in `services.json`

If a link is referenced in `services.json`, it will be included in the search index. Not action is needed to add such entry into the search index. Any change in the navigation file will be reflected in the search index.
If a link is referenced in `services.json`, it will be included in the search index. No action is needed to add such entry into the search index. Any change in the navigation file will be reflected in the search index.

### Entry is not in `services.json`

If the required entry is in navigation file, but was simply not chosen to show up in the `services.json`, it can be references in the `cmd/search/static-services-entries.json`. This is a statically defined equivalent to live `services.json` used only for search indexing purposes. This search only entry can be added into this file.
If the required entry is in navigation file, but was simply not chosen to show up in the `services.json`, it can be references in the `cmd/search/static-services-entries.json`. This is a statically defined equivalent to live `services.json` used only for search indexing purposes. Only a search entry can be added into this file.

There are two possible paths:

#### Entry is existing link any any navigation file
#### Entry has a link in some navigation file

Add the link reference to the `static-services-entries.json`. There a few defined sections purely for organization purposes. If your link does not fit into any existing section, create a new one. Then add the link reference to the `links` array. To learn how to make a link eligible to be references, read this [documentation](https://github.com/RedHatInsights/chrome-service-backend/blob/main/docs/cloud-services-config.md#all-services-dropdown-and-page).

#### Entry is not existing link and is unique to the search index
#### Entry does not have a link and is unique to the search index

If the new entry is not present in any navigation files, new entry has to be created. Follow these steps:
If the new entry is not present in any navigation files, a new entry has to be created. Follow these steps:

1. In the `static-services-entries.json`
2. Pick existing or create new section
3. Create the object definition of the new entry
1. In the `static-services-entries.json` file pick an existing section or create a new one
2. Create an object definition for the new entry

This is an example of such synthetic search entry:

This is an example of such synthetic search entry
```json
{
"custom": true,
Expand Down Expand Up @@ -73,6 +73,6 @@ The final custom section can look similar to this:

To publish the search index follow these steps:

1. Make sure the correct files were change. If you are changing navigation files, make sure to edit both stage and production files.
2. Make sure you are on RH wired network on VPN
1. Make sure the correct files were changed. If you are changing navigation files, make sure to edit both stage and production files.
2. Make sure you are on RH wired network or on VPN
3. Run the `make publish-search-index` command from the project root

0 comments on commit 912461f

Please sign in to comment.