[Sitecore For Newbies] 8 Different Ways For Searching Items

Welcome back to the [Sitecore For Newbies] series! In our fifth video, we’re diving deep into the world of searching items within Sitecore.

Take a look at my video or explore the explanation below:

Effective item searching is a crucial skill for any Sitecore user, and in this episode, we’ll explore eight different ways to streamline your search process.

Begin your journey with the basic. The first search you see when you’re in the Content Editor is the one placed above the Content Tree. You can type anything (1) and press enter (or click in the search icon). Then the search will be performed from top to bottom (3), starting from the ‘sitecore’ item. You can also add criterias to the search (2).

Add criterias to refine your search:

For more information, visit https://doc.sitecore.com/xp/en/users/103/sitecore-experience-platform/search-for-an-item.html.

If you need a more advanced search, Sitecore are equipped with it. You can restrict the search for a specific node, use filters, and perform operation as well.

To do it, go to a desired node, in my case “Renderings”, then click on the item and the click on the Search icon (1). It opens a new tab (2) where you can type the keywords of the search (3). You’re allowed to create queries as well. Pressing enter you can see the results (4) and filter by many criterias (5). In case you need other options for filtering or you’d like to perform operations, such as, Moving or Deleting items, click on the ‘arrow’ next to the search textbox (6). There’s an option to change the visualization clicking on the right side of the search box.

For more information, visit https://doc.sitecore.com/xp/en/users/103/sitecore-experience-platform/search-for-an-item.html.

This is the same as the ‘General Search in the Content Editor’ but not in the Content Editor, it’s in the Media Library.

Basically, your search are restrict to only the media items. The Topic 1 and 2 contains the same explanation for this.

To enable it, go to the LaunchPad and select Media Library:

Even in the EE you’re allowed to search. In that case, the search will be perfomed from the current item to its descendants. It has the same capabilities of the Topic 2, go there and see the explanation.

In the image above, we have:

  1. Opens the search;
  2. Restricts to the current item (you can remove this);
  3. The words to be searched;
  4. Results;
  5. Filters;
  6. More filters and Operations.

Sometimes I get lost when I’m looking for a specific field in an item with many fields. However, Sitecore comes to our rescue with a simple search.

Select the desired item and click on the “Yellow Book” icon on the right top next to the Language button:

It opens a pop-up with a search in the top and the fields below.

Type the name of the field you want to find and click on it, so you’re redirect to the field.

Well, the Desktop Mode, in my opinion, is one of the best features of Sitecore XP/XM because it unlocks many hidden features, and one of them is the Search bar in bottom:

You can type in the search box and it performs a search through all the items of the Content Tree. If you click on an item, it redirects you to it.

This isn’t a trivial search but can be helpful. Basically, you have access to the database and file system which takes your search to another level. There’s no much in the official documentation about that, so to explain it better, I’d like to use the Arvind Gehlot’s explanation in one of his post (https://www.linkedin.com/pulse/some-powerful-administration-tools-sitecore-9-arvind-gehlot/)

“This admin tool helps you to search for a specific string in a database or in the file system. You can search for a specific value in item name, field value and even in the file system. You can also use wildcard for your search but be careful of using it as it may hit the application performance.”

– Arvind Gehlot

You just need to type the keywords (1) and choose some options (2) accordingly to your needs, then press enter or click on the Search button. It takes some seconds to complete.

In case you need some custom search or you want the freedom of coding your own search, you can use Sitecore Powershell Extension (SPE) to do it.

SPE provides the Find-Item command to create our own search.

In your Sitecore instance, go to the PowerShell ISE:

In the image above, we have:

  1. A script to perform the search;
  2. A query to restrict the location and searches for the sentence ‘Banner Title’ in the Title field;
  3. Result. It allows you to click on the item and be redirect to it.

I used this script:

You can also take a look at https://doc.sitecorepowershell.com/appendix/indexing/find-item for more information and code examples.

I hope you’ve now expanded your arsenal of Sitecore searching techniques. Whether you’re a beginner or looking to level up your skills, these eight methods will empower you to navigate Sitecore more efficiently.

Stay tuned for more insights and tips in the [Sitecore For Newbies] series.

🔎 Happy searching!

Leave a Reply

Your email address will not be published. Required fields are marked *