Double filtering by table

Filtering by "chunk" fails and duplicate chunks occur.
No description
13 Replies
kostas
kostas6mo ago
Hi, in the screenshot the filter is on the column "chunk" but you're highlighting content in column chunk_number
Андрей
Андрей6mo ago
This is a different table and this column summarises the selected chunks.
Андрей
Андрей6mo ago
This table is searched
No description
Андрей
Андрей6mo ago
Such filtering also gives an error. Or I am not making the query correctly.
No description
kostas
kostas6mo 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'
},
]
}
})
Андрей
Андрей6mo ago
Original function
No description
Андрей
Андрей6mo ago
there's no 'topic' column
kostas
kostas6mo 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 🙂
Андрей
Андрей6mo ago
I can't figure it out right off the bat 🙂
kostas
kostas6mo 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
Андрей
Андрей6mo ago
Thank you! Now I'll think how to do it in a function ))
Андрей
Андрей6mo ago
Thanks again! It worked!!!
No description
kostas
kostas6mo ago
Awesome, glad there's progress!
Want results from more Discord servers?
Add your server