Yesterday at 07:01 AM1 day Building a Smarter Search: Inside the MBS Script SearchSearching 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 DimensionsAt 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 namesScript IDsGroup pathsScript stepsStep arguments and contentInstead 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 defaultDiacritics removedWhitespace normalizedCamelCase and separators split intelligentlySo 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 SearchThe search experience is controlled by two modes: Exact and Tolerant.Exact ModeExact mode is stricter—but not rigid.No fuzzy matching (no typo forgiveness)Still benefits from normalizationPrefix matching still works while typingBest when:You know what you’re looking forYou want fewer, more precise resultsTolerant ModeTolerant mode is powered more directly by MiniSearch and is designed for flexibility.Supports fuzzy matching (typos allowed)Handles multi-word queries betterKeeps prefix matching activeAvoids fuzziness on short termsExample:set varible excel Still finds:Set Variable [ $Excel ] Best when:You’re exploringYou’re unsure of exact wordingYou expect typos or variationsText vs. Regex: Simple or SurgicalYou can also control how your query is interpreted.Text Mode (Default)Uses the full search pipeline:normalizationsegmentationExact/Tolerant logicAll/Any term handlingRegex ModeFor advanced users, Regex mode allows direct pattern matching.Examples:Set\s+Variable → flexible spacing\b(?:Import|Export)\b → match alternatives^If\b → match line startsImportant details:Invalid patterns are caught immediatelyCase sensitivity can override regex flagsZero-width-only expressions are rejectedRegex is powerful—but it expects precision.All vs. Any: Controlling Multi-Term QueriesWhen searching multiple terms, you decide how strict the combination should be.AllEvery term must match within the same area.Example:excel import Matches only if both terms appear together in:the same stepthe same namethe same pathAnyAny term can match independently.Broader, more exploratory.Results That Stay UsableThe UI is designed to keep results readable and actionable:Grouped by scriptPath displayed as contextMatches highlightedSteps expandable/collapsibleProgressive loading (“Show more”)You can also filter results instantly by:NamesIDsStepsPathsEach 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 PerformanceEverything runs client-side in the browser:XML is Base64-decoded and parsed locallyIndexing is batched for responsivenessSearch runs instantly after a short debounceNo server round-tripsEven large script datasets remain fast and responsive.Where to CustomizeIf you want to tweak behavior, focus on:Search logic and matching helpersBoost scoring (name vs. ID vs. steps)Constants like debounce timing and fuzzy thresholdsAll 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.ActivationYou 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 ThoughtsMBS 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.
Create an account or sign in to comment