folded-ear / gobrennas-api

HTTP API for gobrennas.com
https://gobrennas.com
MIT License
1 stars 0 forks source link

Graphql item dupes #50

Closed barneyb closed 4 months ago

barneyb commented 5 months ago

Expose duplicate pantry item info through the graphql interface, both counts and searching "duplicates of" an item. Right now, it's only 'tight' duplicates, meaning those which match full names/synonym, to reduce noise. So "cabbage" will consider "red cabbage" a duplicate, but not the converse.

Tracking of 'loose' duplicates, which do sub-matching, is in place but not exposed. When that's turned on "red cabbage" will consider both "cabbage" and "red onion" as duplicates. All 'tight' duplicates are also 'loose' duplicates. From a Feb '23 dump of prod, there are about 2100 'tight' dupes, and another 6300 'loose' dupes. Note that those counts are bidirectional, so three identically-named items will express six dupes, and five such items will express twenty (n * (n-1)).