Double filtering by table

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

Did you find this page helpful?