Case insentitive search on whole search term?

I have searched the forum, but I haven’t found a way to do case insentive search that matches the whole search term.

For exmple, I have an item name, e.g. “Apple iPhone”, in a data type. I want to find the item with the exact case-insentive name. So “apple iphone” and "AppLe should return the item. But “apple” and “Apple iphones”, and “iphone” should not. The =, contains, and contain keyword won’t work. So is creating a case insentitve versions of all case insensitive search fields the only solution?

‘Any field contains’ isn’t case sensitive, but with the caveat that it truly looks at all fields on your datatype.

Another approach I have experimented with is effectively forcing Bubble to format the search phrase, and the records its searching, both in lowercase. Something like ‘Input Search’s value:lowercase contains Thing’s name:lowercase’. It would take some playing around on your end to make sure it works but that’s the theory I had.

Is this possible in the search constraint? Let me check it out. :grinning:

I keep a lowercase version of the field, then when you search do Input's value:lowercase

@net-tt Exactly as Tyler mentioned, especially if the search field values do not change frequently. (NOTE you can dump multiple fields:lowercase into this single search field).

“Any field contains” is NOT a good idea like @msgiblin unless you meet 3 conditions (off the top of my head):

  1. The thing has only a few fields that aren’t to be searched;
  2. These few fields don’t have much text in their values; and
  3. both 1 and 2 are not likely to change any time soon…
1 Like

I like to make a dedicated “searchfield” text field, which is a combinations of all of the others fields in one giant string, all lower case

Database trigger keeping that field up to date.

Then when you search for stuff you just need a single constraint searchField contains Input's value:lowercase

Now if only they could expand on this and allow for us to weigh searches based on how many words matched that field, and allow for misspellings and with/without special characters