Don’t know best method of doing this. I keep chatlogs from my twitch irc bot and want others to have the ability to search the logs. how im currently loading the logs. the time for a search is live over few minutes on a name of someone who has a lot of post and the limit of 1000 dataset means I would have to load a lot of data sets as some of the channels have 100k + messages.
import wixData from 'wix-data'
export function button1_click(event) {
wixData.query("fangthe1st")
.limit(1000)
.contains("title", $w("#searchbar").value)
.or(wixData.query("fangthe1st")
.contains("title", $w("#searchbar").value))
.find()
.then((results1) => {
let results1Items = results1.items;
wixData.query("twitchrstracker")
.limit(1000)
.contains("title", $w("#searchbar").value)
.find()
.then((results2) => {
let results2Items = results2.items;
wixData.query("aidyy")
.limit(1000)
.contains("title", $w("#searchbar").value)
.find()
.then((results3) => {
let results3Items = results3.items;
wixData.query("aidyy2")
.limit(1000)
.contains("title", $w("#searchbar").value)
.find()
.then((results4) => {
let results4Items = results4.items;
wixData.query("albxo")
.limit(1000)
.contains("title", $w("#searchbar").value)
.find()
.then((results5) => {
let results5Items = results5.items;
const allResults = results1Items.concat(results2Items).concat(results3Items).concat(results4Items).concat(results5Items);
console.log(allResults);
$w("#repeater1").data = allResults;
})
})
})
})
})
}
$w.onReady(function () {
$w("#repeater1").onItemReady(($item, itemData, index) => {
$item("#text1").text = itemData.title;
})
})