Skip to content

Conversation

colleenmcginnis
Copy link
Contributor

Fixes #1818

Adds more guidance on products metadata. I left a couple code comments inline where I'm not sure what we want to recommend.

@colleenmcginnis colleenmcginnis requested review from reakaleek, KOTungseth and a team September 5, 2025 22:08
@colleenmcginnis colleenmcginnis self-assigned this Sep 5, 2025
@colleenmcginnis colleenmcginnis added the documentation Improvements or additions to documentation label Sep 5, 2025
Copy link

github-actions bot commented Sep 5, 2025

🔍 Preview links for changed docs

@colleenmcginnis colleenmcginnis marked this pull request as ready for review September 5, 2025 22:12
@colleenmcginnis colleenmcginnis requested review from a team as code owners September 5, 2025 22:12
Copy link
Contributor

@theletterf theletterf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Some suggestions and comments as a recent products user.

- id: apm
```

Each product ID is mapped to a full product name.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where's the mapping defined? Shall we point to the source code?

Copy link
Contributor

@cotti cotti Sep 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@theletterf At this moment on main, it's in the code - I'm working on a change that will migrate this to a separate file. I'll update the documentation accordingly by the time the PR is up.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I was just expecting the reader to look at the table in the dropdown. Maybe we should make that clearer?

Comment on lines +57 to +60
% Is this true?
For example, while a page might contain content that is _applicable_ to Elastic Cloud Serverless projects,
it might not be _about_ Elastic Cloud Serverless. In that case, you would include the `serverless` key in `applies_to`,
but _not_ include the `cloud-serverless` ID in `products`:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we perhaps replace this with a small table of When to use vs When not to use?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes sense.

But the original reason was that products are only used for the search.elastic.co filters. At the time of implementation, we did not know how applies_to and products relate to.

Not sure if we even know this today. (this statement is actually a good explanation) But yes, there were ongoing discussions that they are similar. same same but different.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about this guidance @elastic/docs-tech-leads?

Could we perhaps replace this with a small table of When to use vs When not to use?

Can you be more specific about what the table would include? General guidelines? Multiple examples? Something else?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@colleenmcginnis Examples, I would say. Just a suggestion though, this is not blocking the PR.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a tricky example. I would add the corresponding product(s) in all cases.

Meaning that "A page with content that applies to Elastic Cloud Serverless should also be identified with the "cloud-serverless" product ID", to be searchable as such using the elastic.co search. I think this is true in most cases. If the content applies to "Stack", then you'd want product ids to identify which stack components are relevant here, etc.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Meaning that "A page with content that applies to Elastic Cloud Serverless should also be identified with the "cloud-serverless" product ID", to be searchable as such using the elastic.co search.

In that case wouldn't we want that to be derived automatically from the applies_to at some point, rather than requiring the duplication? Then the products would only need to include the level of product detail (components of the stack, etc) that aren't covered in the other metadata

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would add the corresponding product(s) in all cases.

This would require revisiting the products metadata all pages across all repos to duplicate what's included in applies_to since that was not the guidance we used when first adding products. I'm not sure if it's worth the effort without really knowing how we want to use this metadata going forward. @KOTungseth thoughts?

It would probably also mean that filtering by search results by Elastic Cloud Serverless might not be that helpful on its own since so many pages include serverless/stateful applies_to. For example, the PRs that sparked this PR were adding cloud-serverless to (almost) all APM agent docs pages.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In that case wouldn't we want that to be derived automatically from the applies_to at some point

IMO, yes, except for "Stack" where the corresponding product IDs are more granular: elasticsearch, kibana, etc.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But overall this seems logical, if we mark content as applicable to a context, why wouldn't we allow users to find that content when selecting that context through facets?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would require revisiting the products metadata all pages across all repos to duplicate what's included in applies_to since that was not the guidance we used when first adding products. I'm not sure if it's worth the effort without really knowing how we want to use this metadata going forward.

I agree, and I think we shouldn't change this logic before the next phase of thinking around applies_to and versioning. For now we should "just" make sure that the way we specify products ids leads to a better search experience

Co-authored-by: Fabrizio Ferri-Benedetti <[email protected]>
Comment on lines +57 to +60
% Is this true?
For example, while a page might contain content that is _applicable_ to Elastic Cloud Serverless projects,
it might not be _about_ Elastic Cloud Serverless. In that case, you would include the `serverless` key in `applies_to`,
but _not_ include the `cloud-serverless` ID in `products`:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a tricky example. I would add the corresponding product(s) in all cases.

Meaning that "A page with content that applies to Elastic Cloud Serverless should also be identified with the "cloud-serverless" product ID", to be searchable as such using the elastic.co search. I think this is true in most cases. If the content applies to "Stack", then you'd want product ids to identify which stack components are relevant here, etc.

Co-authored-by: florent-leborgne <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[docs] Improve docs on using products metadata
6 participants