Search bar that searches entire database

So I just recently started using Corvid and understand the ground-level of coding behind it. I watched this video on youtube, https://www.youtube.com/watch?v=mTRSPNosLRw , where a database collection can be filtered through a search bar. In the video, they code a search bar that filters the database just fine, but in order to change what you’re searching for (ie. searching by continent) you must use a dropdown. In my case, I am using a collection of music tracks. Obviously each track is released by a certain artist and has a unique title. I want to remove the dropdown and have the search bar be able to search Artist and Track title together. So, for example, I can search for a certain song, and it will filter through, OR I can look up an artist in the same search bar, and all their tracks come up, without having to use a control like a dropdown menu. Can anyone help?

To do a simple search on your dataset then just use Wix Data Query.
https://www.wix.com/corvid/reference/wix-data.WixDataQuery.html

You can search your music dataset with options like contains your song name or contains your track name etc, just need to do it in your code for your search bar.
https://www.wix.com/corvid/reference/wix-data.WixDataQuery.html#contains
https://www.wix.com/corvid/reference/wix-data.WixDataQuery.html#or

Note that this code will find everything in both fields and display it in just the one table, so only suitable of you want to search regardless and not have more searches for things like words in songs and musicians as this will display both together.

import wixData from 'wix-data'

 $w.onReady(function () {

    $w('#searchButton').onClick(function () {

        wixData.query("YourMusicDatasetName")
            .contains("songName", $w("#searchInput").value)
            .or(wixData.query("YourMusicDatasetName")
                .contains("artistName", $w("#searchInput").value))
             .find()
             .then((results) => {
 let resultsItems = results.items;
                console.log(resultsItems);

                  $w('#resultsTable').rows = resultsItems;
            })
    })
 })

Or you look at using multi referenced fields.
https://support.wix.com/en/article/displaying-content-from-multiple-database-collections-using-reference-fields-4034931
https://support.wix.com/en/article/about-reference-fields-in-database-collections
https://support.wix.com/en/article/about-referencing-multiple-items-in-one-field
https://support.wix.com/en/article/working-with-multiple-item-reference-fields

@givemeawhisky I couldn’t get this to work with what I’ve tried. If it helps any more, I am using a preset list from Corvid to show the Tracks. I am also using the wixData.Filter, and I am creating filters every time you type something into the search box. Here is my code. Towards the bottom you will see that I tried to get it to work. Do you think I can fix it with what I currently have?

import wixData from "wix-data";

let lastFilterTitle;
let lastFilterArtist;
let debounceTimer;
export function searchBox_keyPress(event, $w) {
 if (debounceTimer) {
        clearTimeout(debounceTimer);
        debounceTimer = undefined;
    }
    debounceTimer = setTimeout(() => {
    filter($w('#searchBox').value, lastFilterArtist); 
    },200);

function filter(Title, Artist) {
 if (lastFilterTitle !== Title || lastFilterArtist !== Artist) {
 let newFilter = wixData.filter();
 if (Title)
            newFilter = newFilter.contains('title', Title);
 if (Artist)
            newFilter = newFilter.contains('shortDescription', Artist);
        $w('#itemsDataset').setFilter(newFilter);
        lastFilterTitle = Title;
        lastFilterArtist = Artist;
        }
    }
}