Convince a dataset search to ignore apostrophes!!?

Hi all,

I have a working dataset and repeater / search bar.

One of the row titles includes the word “King’s”

Wix only displays the results if you include the apostrophe, if you search “Kings” then it doesn’t show.

Now, I understand Wix is correct in doing this and I’m as much for good punctuation as the next person. However, my customers probably won’t include the apostrophe. I don’t really want to change the name in the Title field, as for those customers who do care about punctuation, I’ll look daft. So really I need a way to either

  1. Get WIX to ignore punctuation in searches

  2. Have a way to enter a few more search fields for a particular item. For example if I could tell Wix that either “Kings” or “King’s” should show this row, that would be fine.

Any ideas?

Hi folks,

In case anyone else stumbles on this. I got around it by creating a second field with “kings” and searching both

In case anyone else finds this I made these changes

import wixData from “wix-data” ;

$w.onReady( function () {
$w( “#button1” ).onClick(()=>{
$w( “#search” ).setFilter(wixData.filter()
.contains( “title” , $w( “#searchbox” ).value)
.or(wixData.filter()
.contains( “search2” , $w( “#searchbox” ).value))
)
$w( ‘#repeater’ ).expand()
$w( ‘#repeater’ ).show()