Help with .hasSome & .contains

I am trying to filter a dataset,repeater & table with Data Query with the following code

export function qcountry_keyPress(event, $w) {
 let searchValue = $w('#qcountry').value;
  wixData.query('ArrivalFormCountry')
    .contains('title', searchValue) //tried with .hasSome too
    .find()
    .then(res => {
      $w('#repeater1').data = res.items;
    } );
}

The problem is that my Database entry has the following name:
A Name, With Comma

When I start typing the word i.e. ‘A Name’ the filter works well but if I do not give the comma (,) the filter does not work

For Eg. The Filter won’t work for this: ‘A Name With Comma’

I even tried this code below:

function filter(fullName, weight, promotion) {
 if (lastFilterName !== fullName) {
 let newFilter = wixData.filter();
 if(fullName)
        newFilter = newFilter.contains('fullName', fullName) //tried with .hasSome too

According to the docs I believe .contains & .hasSome should work even if the search value does not contain the comma (,)

Thoughts ?

no one ?

Hi Shan,
“contains” works by matching the input text to the data in your collection.
it looks for the text you input as a substring of the data in the collection.

hence :
if you look for “A Name” you will find it.
if you for “A Name, With Comma” you will find it.
if you look for “With Comma”, you will find it.
but if you look for “A Name With Comma” the search will fail to find results.

if you only wish to look for a single word match (i.e. for the search string “A Name With Comma” if you find “Name”, “With” or “Comma” it’s enough to be a match), what you can do is perform an “Or” query between three queries, each looking for a single word.

hope this helps!