aparo/pyes — pull request #360 by jesushernandez (2014-01-30 15:35:10+00:00)
Title: Allow native scripts in term facets

For a given use case, we do some string-processing on a field that we want to use for faceting. This can be achieved using facet scripts, as documented [here](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-facets-terms-facet.html#_term_scripts)

In our case, we use a **native** script for this, but if you try to pass the lang parameter to the Facet constructor and execute the query, you get something like:

```
ElasticSearchException: PropertyAccessException[[Error: unresolvable property or identifier: sizefilter]
[Near : {... sizefilter ....}]
^
[Line: 1, Column: 1]]; }]
```