mozilla/elasticutils — pull request #111 by willkg (2013-03-22 16:52:19+00:00)
Title: Rework filters to be more flexible

This makes it possible to extend elasticutils understanding of filters
by subclassing F and adding your own bits to to_filter.

Also updates docs.

The reason I'm doing this with filters is that I'm planning to do something similar with queries and possibly facets, too. That'll make it possible to extend both to add functionality that elasticutils doesn't have.

Please look at the intertwingling of things carefully. I'm not wildly happy about it--feels convoluted. Plus if you pass in key/val pairs, then they go through F.to_filter instead of any F subclasses. That feels like a smell, but I don't know how to nicely work around it.

r?