Double filtering by table

Filtering by "chunk" fails and duplicate chunks occur.
No description
13 Replies
kostas
kostas8mo ago
Hi, in the screenshot the filter is on the column "chunk" but you're highlighting content in column chunk_number
Андрей
АндрейOP8mo ago
This is a different table and this column summarises the selected chunks.
Андрей
АндрейOP8mo ago
This table is searched
No description
Андрей
АндрейOP8mo ago
Such filtering also gives an error. Or I am not making the query correctly.
No description
kostas
kostas8mo ago
The filter to exclude multiple chunks should be:
.filter({
$not: {
$any: [
{
chunk: '65'
},
{
chunk: '78'
},
{
chunk: '69'
},
{
chunk: '66'
},
]
}
})
.filter({
$not: {
$any: [
{
chunk: '65'
},
{
chunk: '78'
},
{
chunk: '69'
},
{
chunk: '66'
},
]
}
})
Андрей
АндрейOP8mo ago
Original function
No description
Андрей
АндрейOP8mo ago
there's no 'topic' column
kostas
kostas8mo ago
It will need to be refactored a bit to generate the filter like in my example above You can add the topic column, I just showed as an example how the chunk exclusion should look like 🙂
Андрей
АндрейOP8mo ago
I can't figure it out right off the bat 🙂
kostas
kostas8mo ago
Here's an example including the topic:
.filter({
$all: [
{
$not: {
$any: [
{
chunk: "56",
},
{
chunk: "54",
},
],
},
},
{
$any: [{ topic: "12" }],
},
],
})
.filter({
$all: [
{
$not: {
$any: [
{
chunk: "56",
},
{
chunk: "54",
},
],
},
},
{
$any: [{ topic: "12" }],
},
],
})
Unless you actually want to exclude topics, in which case add a not to that as well
Андрей
АндрейOP8mo ago
Thank you! Now I'll think how to do it in a function ))
Андрей
АндрейOP8mo ago
Thanks again! It worked!!!
No description
kostas
kostas8mo ago
Awesome, glad there's progress!
Want results from more Discord servers?
Add your server