5

I tried the following searches:

[harry-potter] isaccepted:1 answers:1
      => 0 results

[harry-potter] isaccepted:0 answers:1
      => 0 results

[harry-potter] isaccepted:1
      => 900+ results

[harry-potter]  answers:1
      => 630 results

Seems that searching for >1 predicate in the same search doesn't work.

Is this an official limitation of search? A bug in search? An error in my query #1?

4
  • For us non-programmers, what exactly are you trying to figure out with your code? Just curious. What does "predicate" mean in this context? Commented Jul 12, 2012 at 21:32
  • @Slytherincess - all the HP questions with no accepted answers and <=2 answers (or at least >=2) answers Commented Jul 12, 2012 at 22:11
  • Thanks! Was just wondering :) Commented Jul 12, 2012 at 22:51
  • Dupe-closing this since I've now posted a definitive proposed-FAQ question about the search facility (and made sure to mention that isaccepted: works for answers only and answers: works for questions only!)
    – Rand al'Thor Mod
    Commented Mar 17, 2016 at 13:46

1 Answer 1

8

Yes you can,

[harry-potter] views:250 hasaccepted:1
    => 212 results

The issue you are having is that you are using a predicate that searches for answers that are accepted answers(or not) : isaccepted:1 and one that searches for questions that have a minimum number of answers(or no answers) : answers:1.

It returns no results because there are no answers that are questions, or questions that are answers, so it cant find something that is both an answer that is an accepted answer (or not) AND a question that has a minimum number of answers(or no answers).


**To get the exact result you needed, you have to change isaccepted to hasaccepted:

[harry-potter] hasaccepted:0 answers:1 
    => 160+ results

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