Search Query Limitation of 140 Characters?


Twitter API, often throw an exception saying “Query is too complex or long”. I know Twitter has a limitation of 140 characters. When I query the search API, I pass a search query like “Apple” Banana OR Mango OR Grapes -Potato -Tomato. If this query becomes too complex and exceeds the limit of 140 characters limit then API throws an exception.
I am checking the number of characters in query (Also including the non-search characters which I appended, like OR, - " etc). If it exceeds 140 characters then I trim the search keywords.
I want to clarify whether Twitter also consider these non-search keywords like OR, -, " in 140 characters limitation or just it counts the search keywords ? Do I have to revamp my approach of counting those non-search keywords ?
Please help…!!