Comet
                                
                                
                                
                                    Comet copied to clipboard
                            
                            
                            
                        Exclusive fromTags
So far we have a function in posts called fromTags that gives all posts with any of the given tags. I'd like to have a function that gives all posts that have all of the given tags. Or perhaps better, a search function that takes input like "(1 & (2 &| (3 | 4)) & !5)" and returns all posts tagged 1 AND (2 OR (3 XOR 4)) AND NOT 5 (working syntax, probably want something better than that)
I have created a JSON encoding of the "(1 & (2 &| (3 | 4)) & !5)" example search:
{
    "search": [
        {
            "type": "and",
            "values": [
                {"type": "exactly", "values": 1},
                {
                    "type": "or",
                    "values": [
                        {
                            "type": "exactly",
                            "values": 2
                        },
                        {
                            "type": "xor",
                            "values": [
                                {"type": "exactly", "values": 3},
                                {"type": "exactly", "values": 4}
                            ]
                        }
                    ]
                },
                {"type": "not", "values": [
                    {"type": "exactly", "values": 5}
                ]}
            ]
        }
    ]
}
                                    
                                    
                                    
                                
Perhaps a better way of saying something like "1 & 2 & !3 & !4" would be "1 & ((2 ! 3) ! 4)"
Where x ! y means x without y or x - y
Not implemented on frontend yet, I think I'll keep this issue open until it is