Comet icon indicating copy to clipboard operation
Comet copied to clipboard

Exclusive fromTags

Open MightyAlex200 opened this issue 7 years ago • 3 comments

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)

MightyAlex200 avatar Aug 10 '18 21:08 MightyAlex200

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}
                ]}
            ]
        }
    ]
}

MightyAlex200 avatar Aug 21 '18 03:08 MightyAlex200

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

MightyAlex200 avatar Aug 28 '18 19:08 MightyAlex200

Not implemented on frontend yet, I think I'll keep this issue open until it is

MightyAlex200 avatar Sep 01 '18 01:09 MightyAlex200