pushshift / api

Pushshift API
1.3k stars 111 forks source link

OR operation not working as expected #77

Open edridgedsouza opened 3 years ago

edridgedsouza commented 3 years ago

Compare the following queries:

13 unique comments containing 'bamboo', 0 containing 'black'. https://api.pushshift.io/reddit/comment/search?link_id=knnflb&q=bamboo

25 unique comments containing 'black', 0 containing 'bamboo'. https://api.pushshift.io/reddit/comment/search?link_id=knnflb&q=black

25 unique comments containing 'black', 0 containing 'bamboo'. https://api.pushshift.io/reddit/comment/search?link_id=knnflb&q=bamboo|black

25 unique comments containing 'black', 0 containing 'bamboo'. https://api.pushshift.io/reddit/comment/search?link_id=knnflb&q=black|bamboo

This occurs regardless of whether the terms are enclosed in a bracket group.

My current workaround is simply to perform the query without the q= term and filter the results client-side. However, it would be much quicker to simply do this at the API level.