searchBar Help

I’m using this search code I found but its not ideal. When I search for “Raffle” for example my correct results are returned but if I search for “Bobby won the Raffle” then no results come up. The search is comparing the search bar text to a keyword field. Any help?

HOME PAGE
import {local} from ‘wix-storage’;
import wixLocation from ‘wix-location’;
$w.onReady( function () {
});
export function searchButton_click() {
let word = $w(“#searchBar”).value;
local.setItem(“searchWord”, word);
wixLocation.to(/mysearchresults);
}

RESULTS PAGE
import {local} from ‘wix-storage’;
import wixData from ‘wix-data’;$w.onReady( function () {
var sameWord = local.getItem(“searchWord”);
$w(“#searchBar”).value = sameWord;
$w(“#searchBar”).placeholder = sameWord;
$w(‘#dataset1’).onReady( function () {
search();
});
}); export function searchButton_click() {
search();
} function search() {
wixData.query(‘Tutorial_search’).contains(‘tut_keywords’, $w(“#searchBar”).value) .find()
.then(res => {
$w(‘#repeater1’).data = res.items;
});}

Hi Bill …

Take a look at this forum explanation from a couple of years ago. It shows a different approach in creating this
function:

https://www.wix.com/corvid/forum/main/comment/597d98e40e9b2900107bcd33

thanks for the reply. I read the article but I’m having trouble figuring out what to change. I’m not really great at this.