Solr ignoring NOT but works with "-" and "!" I have a apachesolr module which works well except in one case. I'm not sure what happens when NOT is entered in query, it behaves as OR. It even works for ! and - case.

For eg.

"apple" -"orange" //Results that only has "apple" but not "orange"
"apple" NOT "orange" //Results all the entities that has either "apple" or "oranges"


I have the a very similar installation on another site which seems to work without flaw. Any thoughts on what might be causing this?
Issue was with my implementation. Before the query was posted to Solr, I was doing following:

$query = strtolower($query);


This made the NOT to not hence it wasn't working as expected.