Searching & Filtering Materials

As your collection of saved snippets and code files grows, finding the right material at the right time becomes critical.

Pieces Drive addresses this need with a powerful search engine, user-friendly filters, and intuitive ways to narrow down results by content, language, and more. 


At the very top of the Pieces Drive view is the Search Bar, labeled Find Materials.

This is your starting point for quick lookups.

Natural Language Queries

Pieces supports more than simple keyword matching.

Type a phrase like “How to parse JSON in Python,” and it looks through titles, annotations, and snippet content for matches.

If you recall partial details about a snippet—“route handler,” for example—Pieces tries to interpret your intent and provide the best possible matches.

Instant Results

After you type your query, results populate in the Saved Materials List on the left.

Each matching snippet’s auto-generated title and a quick preview appear—just click any snippet to open it in the main detail pane.


Searching “local storage React” can bring up multiple snippets involving React’s local storage usage, even if the phrase “local storage” doesn’t appear verbatim in the snippet title.


Quick Filters

Right next to the search bar, you’ll see Quick Filter toggles in the dropdown that can help you narrow down your search quickly.

These are:

  • Titles: Matches against snippet titles (auto-generated or custom).

  • Annotations: Matches text that appears in the snippet’s annotations or descriptions.

  • Content: Matches the literal code or text content of your snippet.

You can enable one, two, or all three filters at once.


Filter

Search Type

Result

Title

Matches against snippet titles (auto-generated or custom).

Annotation

Matches text that appears in the snippet’s annotations or descriptions.

Content

Matches the literal code or text content of your snippet.

All Filters

Pieces searches titles, annotations, and snippet code simultaneously—broadest results.


This level of granularity helps you quickly dial into the snippet you need without scrolling through dozens of partial matches.

Advanced Filtering

For deeper searching, Pieces Drive offers an Add Search Filters feature which has an icon, located to the left or right of the Quick Filters (depending on your interface layout).

These advanced filters let you refine your search using specific criteria and store them for later reuse.

via Language, Tags, and Phrases

Pieces lets you filter using language, tags and specific natural language phrases so that you see only what you need to see—this is particularly useful if you have similar-sounding snippets across multiple languages.

There are a few different use cases for searching with these methods:

  • Language: Search your Pieces Drive for saved materials written in Python, C#, JavaScript, TypeScript, or other languages.

  • Tags: If you only want backend-related Node.js snippets, you can add a tag filter for “Node.js” AND “backend.”

  • Phrase: If you remember an exact line of code or an exact phrase, place it within quotes to perform a more strict search (e.g., "server.listen(port)").

Updated on