Contains filter only searches for words

At http://bubble.is/site/cpa I have inputs as filter boxes (couldn’t use autocomplete there since it doesn’t seem to be able to return its text value or a list of objects it finds [just returns a single one]) and the repeating groups under them use a :filtered expression (say a list of students of a class, or classes of a teacher or projects of a teacher) with the filter saying “contains Input Search’s value”.

Although this doesn’t have autocomplete at the filter box (not major problem), it has a real issue in that the repeating group contents disappear as you type in the filter a partial match of a text field you’re filtering against from the repeating group items

Say a have students

George Birt
John Abrahams
Jina Lobster
John Lambert

And I type “J”, I see nothing. When I’ve typed “Jina” or “John” (a full word), then I only see filtered list content

Is there any way around it? As it is now it isn’t much useful (and most users will think the filter just doesn’t work since they won’t bother type in a whole word)

Could contains have a parameter to enable partial matches or something? Or have a separate function?

Also could there be starts-with and ends-with functions?

Can I write my own matching function in some way? (preferably not in Javascript, unless an example is given on the UI that I edit [that is I don’t have to go to the manual to see the search method signature I need to define)

6 Likes

also related: AutoFill Search Function improvement

Hello again,

This is something we are looking at in the medium-term. Several other users asked for it and it makes lots of sense, it’s been delayed since it has deeper performance implications. We’ll look into starts_with and ends_with at the same time as this.

Thanks for bringing it up!

No way to write your own function quite yet.

1 Like

Hello @georgeciobanu

Any update on this yet?

No not yet, we’re in the middle of a big backend upgrade so we’ll look at these things after, if there is enough demand for it.

I just tried doing something similar today and the current_record.field_name CONTAINS input.text is acting more like a strict equivalence than a substring contains. I’m trying to get a type and real time search behavior similar to the iTunes store example that is using an external API (which does work correctly). However, with data in the database, I’m not able to get the right behavior. So I am adding my request in with the others to increase the demand. Modern UI for search should be near realtime as we type.

2 Likes

Would like to let you guys know that I too would love this updated to be able to perform more modern searches. I have a thing that requires me to be able to search on letters instead of words.

As I understand there is also no way of working around this until a proper implementation has been done?

Regards,
Olrik

1 Like

It would be great to have on Bubble.

There is a complex workaround - but it involves storing your data elsewhere.

I am using https://www.contentful.com/ for one project, that allows partial searches via API.

We’re in the middle of a backend migration, we’ll what we can do after that.

Thanks for the suggestion @NigelG. I think that’s a bit too complex for the system I’m building right now though.

I’m afraid I’ll have to stick with word searches until then. Luckily some fields work quite nicely with a “Search box” to let the autocomplete do the rest, but that won’t work for all my fields, sadly.

@emmanuel, I appreciate all you do with Bubble. I am starting to love it more and more, and really think that what I am building can become a really good app. It’s very addictive to keep building, as I should probably do other work too, but am fully focusing on Bubble at the moment :wink:

Regards,
Olrik

1 Like

Hey guys,

Is this still on the list, can we expect this soon.

thanks

They moved to PostgreSQL, hope they’ll implement this now

Is this working yet?

No. I wish they add this soon.

1 Like

Bump!

Any update on this yet?

2 Likes

Unfortunately no

Would love to have this too! :slight_smile:

The initial character search is possible using :truncate

A search for any string is possible but not all that easy, you need to split out the various n-grams.

Having the ability to do “is like %ball%” style is going to be a pain at any scale at all.

1 Like

Thanks Nigel, would that be the case for Dedicated hosting services as well where I assume you have your own DB? Thanks for the note on the :truncate . Its not a huge issue as I assume most users of an application would type in a full word and not part word but I know that I do it sometimes :slight_smile: . Thanks for your answer

@emmanuel Any progress on that? There’s a patch for that, right?
Creating a new field and separate into block of small words, ie: Albert -> A Al Alb Albe Alber Albert
The only problem is still the first letter isn’t detected. Any suggestion?

1 Like