Same query: "contains" returns nothing, "contains keywords" returns results

hi folks,

while building a search results page I am getting weird behavior from bubble search query.

in the image below I have a repeating group that works well without constraints and then when I try adding a constraint it doesn’t work when I use “contains”, but it works well when I use “contains keywords”.

even if i try with the same job-title as in the item in the db (lets say “social media manager”) it returns nothing!
i am using the “get keyword from page url” way.

am i doing something wrong or is it the way it is?
i am actually following a tutorial where the guy is using contains instead of contains keywords and it’s so frustrating that it’s not working…

thanks in advance!

hi @roxius,
It works for me as expected and I think there’s some kind of typo hiding in db values…
There could be many reasons, so i’d highlight several points:

  1. contains is case-sensitive - be sure your substring is in the same case as in DB
  2. ensure that job titles in db and job-title parameter of the URL contains normal spaces, not &#160, U+2009 or other alternatives
  3. ensure that no job titles contain double spaces, that sometimes occasionally happens
  4. if you have second language installed, ensure that db values don’t have some letters (that looks equally in both languages) mistyped.

Finally, when you tested it with db value, did you typed it or copied from DB and then pasted? If the former, try copying it… Finally try to put some simple word in job-title field of DB to ensure no spaces or mistyped letters infiltrate and then recheck…

hey vladimir, thanks so much for the timely reply!

i ticked all your boxes - still the problem persists. it’s not critical - i can still do with keywords but it’s kinda annoying, specially for someone trying to learn bubble.

made a few changes and the situation is like this:

  • db field is now “role” (before it was “Role-title”)

(1) search field’s page workflow is sending a url parameter key named “role” (along with the location)

(2) on page search-results2, using the contains keywords i get what i want when i have “social” as query.

(3) changing it to only contains, returns nothing. note that the title prints the url key correctly, so the page is receiving it right.

notice that i didnt have this problem with the location key and setting is as constraint.

:thinking:

The above case doesn’t work because “contains” is case-sensitive. Your “Social…” starts with uppercase “S” while query contains lowercase “s”…

1 Like

ooh, now i get it :man_facepalming:
thanks!

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