2
  1. I want to search questions answered by me and some another user. How can I do this? I don't see an "and" operator.
  2. Is there a way to search through comments (answers under which there is some comment text)?
6
  • For 1., this answer may work. For 2., see How can I search for specific comments?
    – Glorfindel Mod
    Commented Jan 23, 2023 at 18:15
  • For #1, do you want to find questions answered by you and at least one other user? Or do you want questions answered by you and a specific other user?
    – cocomac
    Commented Jan 23, 2023 at 18:20
  • @cocomac Specific.
    – oleedd
    Commented Jan 23, 2023 at 18:21
  • 1
    @oleedd I'm not sure how off the top of my head, but it's likely possible using SEDE. I don't know exactly what the SQL needed would be, but I'd guess it is possible
    – cocomac
    Commented Jan 23, 2023 at 18:23
  • @Glorfindel 1. Unfortunately, it doesn't work (if I do correctly). 2. I know how to search in Google) I mean the direct search. Maybe something new since 2009...
    – oleedd
    Commented Jan 23, 2023 at 18:31
  • 1
    @oleedd: To search comments, you can use this data explorer query
    – Himanshu
    Commented Jan 24, 2023 at 8:40

1 Answer 1

4

I want to search questions answered by me and some another user. How to do this? I don't see an "and" operator.

This is not possible via normal search, so you have to resort to tools like the Stack Exchange Data Explorer. With a bit of SQL, you can write queries like this one; you can change the user IDs and the site you want to search on:

enter image description here

13
  • Can you make it work with nicks instead of id's?
    – oleedd
    Commented Jan 23, 2023 at 19:26
  • Possible to search just with search?q=?
    – oleedd
    Commented Jan 23, 2023 at 19:27
  • Nicknames are not unique, and it would make the query slower (two extra joins), so that's bad practice. And it's unfortunately not possible with regular search ...
    – Glorfindel Mod
    Commented Jan 23, 2023 at 20:27
  • I want to try with nicknames. How to modify? Ideal variant: id or nickname. Possible?
    – oleedd
    Commented Jan 23, 2023 at 20:39
  • You'll need to join both Posts tables with Users (not unlike this page in the awesome tutorial and filter onDisplayName.
    – Glorfindel Mod
    Commented Jan 23, 2023 at 20:40
  • I don't know sql and can't do this. Can you make it work with both id's and nicknames?
    – oleedd
    Commented Jan 23, 2023 at 20:45
  • I could, but as I said, it's bad practice, so it would reduce the quality of my answer.
    – Glorfindel Mod
    Commented Jan 23, 2023 at 20:46
  • I think I will accept it after that. For now, I have to get id's to use it, not handy.
    – oleedd
    Commented Jan 23, 2023 at 20:50
  • And it will still work with id's...
    – oleedd
    Commented Jan 23, 2023 at 20:52
  • so it would reduce the quality of my answer — you can make a new query for this (no any reducing).
    – oleedd
    Commented Jan 23, 2023 at 21:04
  • It shows duplicates if another user or/and I have more than 1 answer (more answers, more duplicates). Is it fixable?
    – oleedd
    Commented Jan 23, 2023 at 23:12
  • Now that is a good suggestion, and I've implemented it now.
    – Glorfindel Mod
    Commented Jan 24, 2023 at 7:43
  • Please make a new query for nicknames. You can give it in a comment if you don't want to change the answer.
    – oleedd
    Commented Jan 24, 2023 at 9:32

Not the answer you're looking for? Browse other questions tagged .