Search by any word and intersect the results

Hello good community:

I am trying to search by any word typed in a String, for example
I want to find pipes
I search: “fix some pipes”
Result: none

What i need is this:
I want to find pipes
I search: “fix some pipes”
Result: pipes

I have tried to use Fuzzy search and it works but only when I search for 1 word. In My app, users will generaly search by a string and I need a way to extract each word and show results for each word but grouped in the same repeating group.

In my app, I use a keyword column in the users object, so I need to match any word that was written with any keyword that the users has.

Hope some can help me,

I think you mean to intersect results for each keyword

Yes but first, I need to search for each word in a string and then intersect the results

correct, split input/search and for each word find its matches and intersect results w/ each other.

I read about a solution you proposed for another user, By using 2 RG to search for every word. Is there a way to skip that part? I want to avoid creating a RG per each word, because I don´t know how many words the string will have. It can have 1, or 5 words or maybe more than that. Also, I want to show my users the results in only one group.

That other solution was probably to show it as one (perhaps using hidden RGs but intersecting them into the visible RG?) and use one RG per word. I don’t think you can do it any other way (using Bubble’s DB) and expect your page to not crash. You can certainly limit the amount of words or characters in the search

I am thinking maybe i can do something like this:
do a search for [DB] Tags contains keywords:Searchbox.value:sliptby( ):item #1 OR
do a search for [DB] Tags contains keywords:Searchbox.value:sliptby( ):item #2 OR
do a search for [DB] Tags contains keywords:Searchbox.value:sliptby( ):item #3 OR

And so on…

Not a good idea performance-wise, hence the intersecting of separate searches.

Ok, let’s say i have the results of the matches for word 1 in RG1 and for word 2 in RG2, how can intersect them in one RG?

RG1’s list of matches:intersected with RG2’s list of matches

Great that did it! Instead of using hidden RG, I used Search&Autocorrect elements for each word. And in the RG i merged the results of them. Thank you for pointing me up to the solution :slight_smile:

This topic was automatically closed after 70 days. New replies are no longer allowed.