Filter queries by references...and more
Adafede opened this issue · 0 comments
Adafede commented
For now we perform all queries and then take the intersect.
It is still fast but could probably be much faster if we did not.
This would complicate a bit the code but probably be more efficient.
So instead of doing
1 = set(structures_matching_structures(wholeset)))
2 = set(structures_matching_taxa(wholeset)))
3 = set(structures_matching_references(wholeset)))
final_set = set.intersection(non_empty(1,2,3))
We could do
1 = set(structures_matching_reference(wholeset)))
2 = set(
if(nonempty(1)){
structures_matching_taxa(1)
}
else{
structures_matching_taxa(wholeset)
}
)
final_set = set(
if(nonempty(2)){
structures_matching_structures(2)
}
else{
structures_matching_structures(wholeset)
}
)
What do you think @bjonnh?