Migrating Bubble Search: Preserve Filters, Sorting and Pagination
A rebuilt directory can look right and still hide the listing a customer needs. An admin queue can load faster but show a different set of orders. A count can match while page two repeats records from page one.
When you migrate Bubble search to code, the goal is not to translate a “Do a search for” expression line by line. It is to preserve the product's agreed behavior: which records a person can find, how filters combine, how results are ordered, and what happens as the data changes.
This guide covers search inside your application, including repeating groups, dashboards and filtered lists. It is not a guide to Google rankings or public-page SEO. Start with a small set of representative searches, write down their expected results, and make those examples part of migration acceptance.
Start with the user journey, not the search box
Search often lives in places that do not look like search: an “Unassigned” queue, a dropdown of available resources, an invoice list, or a count beside a status tab. Inventory those surfaces before selecting a database or search engine.
For each critical surface, record:
- Who uses it, including account, role and tenant or organization.
- The records and fields it searches, plus any related records used by the conditions.
- Default filters, optional inputs, saved filters and URL parameters.
- Sort order, page size, counts and any “Load more” behavior.
- What should happen after creating, editing, archiving or deleting a matching record.
- The decision or action the user takes from the result.
Include search supplied by plugins or external services. A Bubble repeating group might display a database search, a list held in a custom state, or an API response. Those are different sources of behavior, even when the screens look similar.
The Bubble data migration checklist covers whether the underlying records, relationships and access rules survive. Search acceptance answers the next question: can the right person reliably find the right records after that transfer?
Write down filter meaning before rebuilding it
A filter label is not a complete specification. “Active customers” might mean a status value, an unexpired subscription, at least one recent order, or a combination of conditions. Translate the business rule, not just the label.
Empty inputs need an explicit decision
Bubble's search reference documents the “Ignore empty constraints” setting. A null-valued constraint may be omitted when that setting is enabled; without it, the search can instead look for a null field value. The reference also distinguishes advanced filtering from search constraints.
Inspect the actual expression and test an empty control. Do not assume that a blank dropdown, an empty text string, null and “All” mean the same thing in the replacement. Likewise, zero and false are legitimate values, not automatically missing inputs.
A useful acceptance sentence is: “With no status selected, show every otherwise eligible status, but never include archived records.” That is clearer than “status is optional.”
Test combinations and boundaries
For each important filter, write down whether it matches exactly, matches part of a value, requires any selected tag, or requires all selected tags. Test both individual filters and combinations. A replacement that joins two conditions with OR instead of AND can return plausible but incorrect results.
Check text with capitalization, accents, punctuation and leading or trailing spaces. Specify whether those differences matter instead of assuming that a new database's text comparison or a search service's relevance settings match Bubble.
For dates, record the user's time zone and the intended boundary. “Created today” is not a universal UTC interval. Test a record immediately before, at and after the boundary, including a daylight-saving transition when relevant to the app. For prices and other numeric ranges, distinguish an inclusive boundary from an exclusive one and test zero separately from a missing value.
If the old app's behavior is inconsistent or plainly wrong, do not silently reproduce or fix it. Record an explicit product decision and keep the approved change separate from migration parity. Otherwise, a genuine defect and an intentional improvement look identical in the comparison.
Separate finding a record from permission to see it
A filter such as “organization equals the current user's organization” is not, by itself, an adequate replacement for the application's authorization model. The server must enforce who may access a record and which fields it may return.
Bubble's privacy-rule documentation describes controls over whether records appear in searches and which fields are visible. Inspect those rules alongside the search expression. An administrator's successful search does not establish what an ordinary member should receive.
Test a member of another organization, a logged-out visitor and a user whose membership has been removed. Check suggestions, result counts, facets and exports as well as the visible list. “No rows shown” is not enough if an unauthorized title appears in autocomplete or a count reveals restricted records.
Apply access checks before returning protected data, not by hiding it in the browser. If a search index contains restricted information, define how authorization and permission changes reach that index and how the application prevents disclosure while updates are pending. An index should not become an independent source of access rights.
Make sorting and pagination a single contract
“Newest first” leaves a question unanswered: what happens when several records have the same timestamp? Agree a deterministic tie-breaker, such as a stable record identifier, and test it with deliberately tied values. Preserve the intended direction for every sort field and decide where missing values belong.
PostgreSQL's LIMIT and OFFSET documentation explains why a uniquely ordered result is important when retrieving different subsets. Without it, page boundaries can produce unpredictable subsets. The lesson is broader than a particular SQL query: a page number is meaningful only in the context of a defined order.
Check the order of operations as well. If a filter is meant to apply to the entire eligible dataset, applying it only after fetching the first page can hide valid matches on later pages. Sorting one fetched page is also different from sorting all matching records before pagination. Include a case where the only matching record lies beyond the first unfiltered page, and verify that it is still found. Preserve an intentional page-local operation only when that behavior is explicitly agreed.
For a fixed test dataset, traverse every page and compare record identifiers, their order and the number of times each appears, using an old-to-new ID map if identifiers changed. Checking only the total count can miss a duplicated record paired with an omitted one. Test an empty result, exactly one full page, one record beyond a page boundary and a final partial page.
Changing filters should also reset or deliberately reinterpret the current page or cursor. A user on page eight of a broad search should not see an unexplained empty screen after narrowing it to three matches. Specify how browser Back, saved URLs and restored filters behave.
Decide what a changing list should do
Even a deterministic order does not freeze the dataset. New records, edits and deletions can move page boundaries between requests. A cursor-based design may reduce some shifting effects, but it does not automatically promise a consistent snapshot or solve edits to the sort key.
Choose the experience deliberately. A live operations queue may refresh and tell the user that results changed. An export or audit view may need a defined point-in-time dataset. Test the chosen behavior by inserting, updating and deleting a record between page requests.
If users select rows for an action, keep selection tied to record identity, not row position. Re-sort the list with a selection or detail panel open and confirm that the intended record remains selected. Recheck permission and current record state on the server when executing the action.
Use a small, explainable acceptance dataset
Build a controlled staging dataset with known expected outcomes. Avoid copying unnecessary personal information into test fixtures. Include records that differ in one meaningful way so a failed result tells the team what to investigate.
Here is a fictional acceptance example, not a client case:
A support queue has six tickets. Four belong to Organization A; two belong to Organization B. Of A's tickets, one is archived, two (DEMO-101 and DEMO-102) are open with the same creation timestamp, and one is closed. A member of A searches for open, non-archived tickets, newest first, with one result per page.
The expected result is the two open A tickets, each appearing once across two pages, with DEMO-101 on page one and DEMO-102 on page two when the tie-breaker is ID ascending. Clearing the status filter should also include A's closed ticket, but not its archived ticket or either B ticket. A matching total count alone cannot establish that the correct tickets were returned.
Add separate cases for an empty optional input, a real zero or false value, a date boundary, a text-matching difference and a revoked membership. Do not combine every edge case into one record: isolated failures are easier to diagnose.
A copyable search acceptance record can contain:
- Surface and business purpose.
- Test dataset version and observation time.
- User role, organization and access state.
- Exact inputs, empty-input behavior and combined conditions.
- Expected record IDs, fields, order, count and page sequence.
- Expected behavior after a relevant data or permission change.
- Observed result, mismatch explanation and product decision if behavior intentionally changes.
Run the same scenarios against Bubble and the replacement using comparable data and identities. If the datasets changed between observations, reconcile that difference before diagnosing a query defect. When Bubble's current output conflicts with the agreed requirement, retain both the observation and the approved expected result.
Treat an external search index as another migration dependency
Not every rebuilt Bubble app needs a dedicated search engine. Ordinary filtered lists may be served by the database. Full-text relevance, typo tolerance, geographic ranking or other requirements may justify additional infrastructure. Choose it from the product's needs rather than because migration seems to require a new tool.
If an index is used, document which system owns the underlying records, how updates and deletions reach it, and how failures are detected and repaired. Verify that an initial import is followed by reconciliation of changes made during that import. A successful bulk load does not prove that a recently archived record or removed permission has propagated.
Include result freshness in acceptance: what delay is acceptable, what users see while an update is pending, and what happens when indexing fails. Test deletion and permission revocation explicitly. Do not equate an indexing job's successful completion with correct customer-visible results.
Keep the wider launch and recovery plan in the Bubble migration cutover guide. For search, add a focused launch check: the agreed result scenarios pass against the launch dataset, the update path works, and the team knows how to disable or repair a faulty search surface without exposing restricted data.
What to ask for before accepting the rebuild
Ask for the search inventory, the approved behavior differences, and repeatable acceptance evidence for the important journeys. Then ask the team to demonstrate one denied-access case, one page-boundary case and one update that changes a result.
Measure responsiveness too, but keep it separate from correctness. A quick wrong answer is not a successful migration. If workload cost is the reason you are reviewing the current implementation, the Bubble workload audit is a better starting point than assuming a rebuild is necessary.
Bubble to Code's migration process includes rebuilding list-with-filter pages and testing critical user flows. The team combines Bubble development and software engineering, which makes both the original expression and its replacement relevant to the review.
Planning a migration? Book a migration review and bring one important search journey, its filters and an example of the expected results. It gives the discussion a concrete starting point: what must stay the same, what should change, and how you will tell the difference.
Frequently asked questions
- Does a Bubble search expression become the same SQL query?
- Not necessarily. The expression, privacy rules, additional filtering, UI state and any external service together determine what the user sees. The replacement can use a different implementation while preserving the agreed result and access behavior. Validate the outcome rather than assuming a syntactic translation is sufficient.
- Should we add typo tolerance or relevance ranking during migration?
- Only as an explicit product change. Those features can alter which records match and their order. Keep parity tests for unchanged behavior and create separate acceptance examples for the new behavior. Do not let a feature upgrade obscure a missing or unauthorized result.
- Is a matching result count enough to approve search?
- No. Compare the expected record IDs, permitted fields, order and page traversal. Then test changes to records and permissions. Counts are useful supporting evidence, but the same count can conceal different records, duplicates or disclosure of information a user should not receive.
Sources
- 01Search · Bubble Docs
- 02Protecting data with privacy rules · Bubble Docs
- 03LIMIT and OFFSET · PostgreSQL Docs
Keep reading
Bubble to Code is an independent service. Not affiliated with, endorsed by, or sponsored by Bubble Group, Inc.
