martin-magakian / Amazing-Cloud-Search

Allow you to search, faceted search, add, update, remove objects from your Amazon Cloud Search Index in C#.
30 stars 17 forks source link

Added negate to IntBooleanCondition #9

Closed TCBroad closed 10 years ago

TCBroad commented 10 years ago

I noticed negate was missing from IntBooleanCondition so added it. Code is pretty much the same as the string version.

martin-magakian commented 10 years ago

Thanks for your commit. It look good to me.

What is your thinking about this "Negate"? I don't know... It doesn't sound to me like one can understand the API without looking in the source code. Maybe we should review the way BooleanCondition work? Or maybe simply rename "Negate" into something more explicite? Maybe an enum?

Let me know your thought.

Also can you add some documentation in README.md by adding or updating an example. Maybe update the example "from 2000 to 2004 in category Sci-Fi" into "from 2000 to 2004 NOT in category Sci-Fi". It's up to you.

TCBroad commented 10 years ago

I'd be happy to add that documentation - I'm a little busy at the moment but will try and do it in the next couple of days.

I think the way the boolean conditions work is fine but agree that it could be clearer. If you wanted to use an enum maybe you could have "Nor" and "Nand" or "OrNot" and "AndNot"?