7

How can I search an issue on GitHub that contains keywords "java" AND ("python" OR "C++")? Is it possible to represent a search with these logical operators like OR/AND?

Richard Hu
  • 811
  • 5
  • 18
  • What do you want to search? Is it a user, is it various repositories, pull requests or maybe issues? – georgekrax Sep 16 '20 at 14:22
  • 1
    @georgekrax An issue in a repo whose description and comments contain keywords like "java" AND ("python" OR "C++") – Richard Hu Sep 16 '20 at 14:23
  • See also "[Can I search GitHub labels with logical operator OR?](https://stackoverflow.com/a/68621781/6309)" – VonC Aug 02 '21 at 12:43

2 Answers2

6

It turns out GitHub does not provide functions to achieve the searching logics like ANR/OR. The solution I figured out is to write a crawler that implements the searching logics.

Richard Hu
  • 811
  • 5
  • 18
3

Well, GitHub does not work like StackOverflow, but there are some ways to achieve what you want to accomplish. Start by using the type label, like this type:issue, then you can use the in qualifier, like this python in:title,body, which will search titles that contain the word python. Here is a more detailed (reference) of GitHub's Docs, which might help you with your issue.

I hope this helps you, but as much as I searched I could not find conditional search features on GitHub's search, but there are some pretty useful labels (qualifiers) that you can benefit from.

georgekrax
  • 1,065
  • 1
  • 11
  • 22
  • Thanks for your comments! In fact I have resolved my problem with a crawler that implements the searching logics. – Richard Hu Sep 18 '20 at 07:16