Building a Smarter Search: Inside the MBS Script Search
Searching through FileMaker or the XML export can quickly become overwhelming. XML dumps are dense, deeply nested, and often inconsistent in formatting. That’s exactly the problem the MBS Script Search in MBS FileMaker Plugin was built to solve: a fast, flexible, browser-based search tool that makes large script collections actually usable.

This post walks through how the search works, what makes it different, and how to get the most out of it.
One Search Box, Multiple Dimensions
At its core, MBS Script Search is not just a text search—it’s a structured search across multiple layers of script data.
A single query can match:
-
Script names
-
Script IDs
-
Group paths
-
Script steps
-
Step arguments and content
Instead of scattering results, the UI groups everything by script. That means when a script matches in multiple places, you see all of those matches together in one cohesive result.
Smart Normalization (So You Don’t Have to Be Precise)
One of the biggest usability wins is normalization. Before any search happens, the input and indexed data are transformed to reduce friction:
-
Case-insensitive by default
-
Diacritics removed
-
Whitespace normalized
-
CamelCase and separators split intelligently
So a query like:
setvariable
can still match:
Set Variable
set_variable
SetVariable
You don’t have to guess formatting — the search adapts to you.
Exact vs. Tolerant: Two Ways to Search
The search experience is controlled by two modes: Exact and Tolerant.
Exact Mode
Exact mode is stricter—but not rigid.
-
No fuzzy matching (no typo forgiveness)
-
Still benefits from normalization
-
Prefix matching still works while typing
Best when:
-
You know what you’re looking for
-
You want fewer, more precise results
Tolerant Mode
Tolerant mode is powered more directly by MiniSearch and is designed for flexibility.
-
Supports fuzzy matching (typos allowed)
-
Handles multi-word queries better
-
Keeps prefix matching active
-
Avoids fuzziness on short terms
Example:
set varible excel
Still finds:
Set Variable [ $Excel ]
Best when:
-
You’re exploring
-
You’re unsure of exact wording
-
You expect typos or variations
Text vs. Regex: Simple or Surgical
You can also control how your query is interpreted.
Text Mode (Default)
Uses the full search pipeline:
-
normalization
-
segmentation
-
Exact/Tolerant logic
-
All/Any term handling
Regex Mode
For advanced users, Regex mode allows direct pattern matching.
Examples:
-
Set\s+Variable→ flexible spacing -
\b(?:Import|Export)\b→ match alternatives -
^If\b→ match line starts
Important details:
-
Invalid patterns are caught immediately
-
Case sensitivity can override regex flags
-
Zero-width-only expressions are rejected
Regex is powerful—but it expects precision.
All vs. Any: Controlling Multi-Term Queries
When searching multiple terms, you decide how strict the combination should be.
All
Every term must match within the same area.
Example:
excel import
Matches only if both terms appear together in:
-
the same step
-
the same name
-
the same path
Any
Any term can match independently.
Broader, more exploratory.
Results That Stay Usable
The UI is designed to keep results readable and actionable:
-
Grouped by script
-
Path displayed as context
-
Matches highlighted
-
Steps expandable/collapsible
-
Progressive loading (“Show more”)
You can also filter results instantly by:
-
Names
-
IDs
-
Steps
-
Paths
Each filter shows counts, so you can quickly understand where matches are concentrated.
Copy What You Need (Without the Noise)
The built-in copy feature respects what you see.
Two modes:
Full copy
- Set Variable - Line 41: full step content here
Summarized copy
- Set Variable - Line 41
- Contents: shortened preview here
This makes it easy to move results into documentation, tickets, or code reviews.
Designed for Performance
Everything runs client-side in the browser:
-
XML is Base64-decoded and parsed locally
-
Indexing is batched for responsiveness
-
Search runs instantly after a short debounce
-
No server round-trips
Even large script datasets remain fast and responsive.
Where to Customize
If you want to tweak behavior, focus on:
-
Search logic and matching helpers
-
Boost scoring (name vs. ID vs. steps)
-
Constants like debounce timing and fuzzy thresholds
All of these live in:
search.html
Small changes here can dramatically shift how the search feels. You can take the search.html, modify it and put it in the extensions folder. Our plugin will use your custom search file.
Activation
You activate the search with the checkbox in the preferences dialog.
Or if you prefer to turn MBS features on by script, you can use SyntaxColoring.ScriptSearchButton.SetEnabled function.
Final Thoughts
MBS Script Search isn’t just about finding text—it’s about making complex script data navigable.
By combining normalization, structured indexing, and flexible query modes, it removes the usual friction of XML searching and replaces it with something fast, forgiving, and surprisingly intuitive.
Whether you’re tracking down a script ID, debugging a step, or exploring unfamiliar logic, the search is designed to meet you where you are—and help you get to the answer faster.