taw / magic-search-engine

Search engine for Magic cards
MIT License
47 stars 19 forks source link

`promotype:` query support #171

Closed taw closed 1 year ago

taw commented 1 year ago

Since mtgjson has this data, we might just as well expose it.

It also covers is:boosterfun as it's basically promotype:boosterfun.

(index should have promo_type or promotype, there's no camelcase there)

axxroytovu commented 1 year ago

Do you want the boosterfun pack logic to exist in the pack YAML queries, or in the search?

As an example for ONE:

These could be resolved by making the YAML search more comprehensive, but then has:boosterfun would flag Argentum Masticore as having a boosterfun printing. Or we can implement more logic to is:boosterfun, but then it no longer tracks 1-1 with promo_types:boosterfun.

taw commented 1 year ago

I think is:boosterfun should be just promotype:boosterfun and that should just be whatever mtgjson says.

If we need additional query types, we should come up with them, with some good definitions.

taw commented 1 year ago

promo: queries added, very similar to how frame: query works. There's a lot of them.

promo:buyabox, promo:boosterfun etc.

All of them are also aliased to is: and not:, as there are no conflicts. (frame: has a few conflicts, where is:X already means something else).