-
-
Notifications
You must be signed in to change notification settings - Fork 594
[6.x] Search Updates #13108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
duncanmcclean
wants to merge
14
commits into
master
Choose a base branch
from
search-updates
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
[6.x] Search Updates #13108
+280
−51
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
So it can combined with other searchables.
To combine `content`, `users` and (soon) `addons`.
duncanmcclean
commented
Nov 20, 2025
Comment on lines
+20
to
+21
| protected static array $cpSearchables = []; | ||
| protected static array $contentSearchables = []; |
Member
Author
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if these might be better off as container bindings? 🤔
This was referenced Nov 21, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request aims to separate "content searches" from "everything" searches, allowing addons to register searches that are used exclusively in the Control Panel.
Use case: In my e-commerce addon, Cargo, I want orders and discounts to appear in the Command Palette, but not be searchable on the frontend via the
{{ search }}tag.'searchables' => 'all'Previously, you could set
'searchables' => 'all'on a search index to include entries, terms, assets, users and anything provided by custom searchables.To split "content searches" (frontend) from "everything searches" (CP), support for
'searchable' => 'all'has been removed.You can now either use
'searchables' => 'content'- which includes entries, terms and assets (not users) - or explicitly list the searchables you want:We’ve avoided automating this migration so you can intentionally decide whether users should be included.
Adding to
contentsearchablesAddon developers can add their own searchables to the
contentwildcard like this:Command Palette search
Statamic configures a
cpsearch index behind the scenes, used by the Command Palette.By default, it uses the
localdriver and includes content (entries/terms/assets), users, and any addon-provided searchables.You can override the configuration in your
search.phpconfig file:Addon developers can add custom searchables to the
cpindex like this:Closes statamic/ideas#240