Search multiple data types - Please Help!

I’m getting close to deploying my site and have held off on the search function as long as possible. Can someone help with a graceful solution for having one search box search multiple data types and fields? Without a central search box my users will have to navigate to the pages dedicated to listing the data type (i.e. Companies) which can prove to be clunky as they’re trying to rapidly review and enter data.

For example: Search for "John"

Companies (Names):

  • Smith Plumbing
  • John’s Plumbing
  • CJ Plumbing

People (Names):

  • Chris Johnson
  • John Doe
  • Jane Smith

Search Results:

  • John’s Plumbing
  • Chris Johnson
  • John Doe

This would make things SOOO much better for my site. Please help!


1 Like

Honestly, the best way is to create a new database table called “Searchable” or something like that.

Any time a Company or Person is created, a new “Searchable” item will be created. The fields will be as follows:

  • title (text)
  • Company (Company)
  • Person (User)
  • company or person (text)

When a Person or Company is deleted, so will the Searchable that is the same as the Person/Company you just deleted. Same thing when editing the Person/Company.

Let me know how you get on,

1 Like

Stuff everything into something like Elastic, and get it to do it for you ?

I would create a test page and add a button. When that button is clicked, an API Workflow on a list will be triggered.

The list should be all of the things you want to reference to make searchable. The action in the API Workflow would be to create a new item in the “searchable” database table. This operation could take a while depending on how much data you currently have in your existing database table(s).

Lastly, remember your development and live databases are separate. If you want to manipulate your Live Database, be sure to push your latest changes BEFORE clicking the button on the test page.

What do you mean by “can’t be managed”?

I am suggesting using an external service to handle searches.

Yes, it is perfectly possible to create a new table with search items. But then you want to do partial searches, and wild cards … and you end up having to do 3/n-grams in bubble (i.e. splitting bubble into bub ubb bbl and ble) and that is going to be fairly tricky.

An alternative is to use one of the text search services that will do all of this for you. Not for free, but certainly quicker and easier ?

Haven’t done it yet myself, but that is what I would do if I needed to.

You could make your own search box with a floating group that contains a repeating group for each of those lists. Set each repeating group to one cell in the editor and “full list” so it expands and contracts properly. Each repeating group would have a search using the same terms, it would just be run on a different table and produce a different list. But if you jam all the repeating groups together and make them look the same nobody will know or care they’re different elements.